blob: 049531e20d7ec84c4bd337c0e1e3836b7f1c77b8 [file] [log] [blame]
Krzysztof Parzyszek7a737d12016-02-18 15:42:57 +00001; RUN: llc -O2 -march=hexagon -relocation-model=pic < %s | FileCheck %s
2
3@dst_ie = thread_local(initialexec) global i32 0, align 4
4@src_ie = thread_local(initialexec) global i32 0, align 4
5
6; CHECK-LABEL: test_initial_exec
7; CHECK: = add(pc, ##_GLOBAL_OFFSET_TABLE_@PCREL)
8; CHECK-DAG: = ##src_ie@IEGOT
9; CHECK-DAG: = ##dst_ie@IEGOT
Paul Robinson51fa0a82016-02-26 19:40:34 +000010; CHECK-NOT: call
Krzysztof Parzyszek7a737d12016-02-18 15:42:57 +000011define i32 @test_initial_exec() nounwind {
12entry:
13 %0 = load i32, i32* @src_ie, align 4
14 store i32 %0, i32* @dst_ie, align 4
15 ret i32 0
16}
17
18@dst_gd = external thread_local global i32
19@src_gd = external thread_local global i32
20
21; At the moment, the local-dynamic model uses the same code as the
22; general-dynamic model.
23
24; CHECK-LABEL: test_dynamic
25; CHECK: = add(pc, ##_GLOBAL_OFFSET_TABLE_@PCREL)
26; CHECK-DAG: = ##src_gd@GDGOT
27; CHECK-DAG: = ##dst_gd@GDGOT
28; CHECK-DAG: call src_gd@GDPLT
29; CHECK-DAG: call dst_gd@GDPLT
30
31define i32 @test_dynamic() nounwind {
32entry:
33 %0 = load i32, i32* @src_gd, align 4
34 store i32 %0, i32* @dst_gd, align 4
35 ret i32 0
36}
37