• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -O0 -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-DAG:      = add(pc, ##_GLOBAL_OFFSET_TABLE_@PCREL)
8; CHECK-DAG:      = ##src_ie@IEGOT
9; CHECK-DAG:      = ##dst_ie@IEGOT
10; CHECK-NOT:  call
11define 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-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
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
38