1 ; RUN: llc -O0 -march=hexagon -relocation-model=pic < %s | FileCheck %s
3 @dst_ie = thread_local(initialexec) global i32 0, align 4
4 @src_ie = thread_local(initialexec) global i32 0, align 4
6 ; CHECK-LABEL: test_initial_exec
7 ; CHECK-DAG: = add(pc,##_GLOBAL_OFFSET_TABLE_@PCREL)
8 ; CHECK-DAG: ##src_ie@IEGOT
9 ; CHECK-DAG: ##dst_ie@IEGOT
11 define i32 @test_initial_exec() nounwind {
13 %0 = load i32, ptr @src_ie, align 4
14 store i32 %0, ptr @dst_ie, align 4
18 @dst_gd = external thread_local global i32
19 @src_gd = external thread_local global i32
21 ; At the moment, the local-dynamic model uses the same code as the
22 ; general-dynamic model.
24 ; CHECK-LABEL: test_dynamic
25 ; CHECK-DAG: = 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
31 define i32 @test_dynamic() nounwind {
33 %0 = load i32, ptr @src_gd, align 4
34 store i32 %0, ptr @dst_gd, align 4