xref: /aosp_15_r20/external/llvm/test/CodeGen/Hexagon/tls_static.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -march=hexagon -relocation-model=static < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker@dst_le = thread_local global i32 0, align 4
4*9880d681SAndroid Build Coastguard Worker@src_le = thread_local global i32 0, align 4
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_local_exec
7*9880d681SAndroid Build Coastguard Worker; CHECK-DAG:   = ##src_le@TPREL
8*9880d681SAndroid Build Coastguard Worker; CHECK-DAG:   = ##dst_le@TPREL
9*9880d681SAndroid Build Coastguard Workerdefine i32 @test_local_exec() nounwind {
10*9880d681SAndroid Build Coastguard Workerentry:
11*9880d681SAndroid Build Coastguard Worker  %0 = load i32, i32* @src_le, align 4
12*9880d681SAndroid Build Coastguard Worker  store i32 %0, i32* @dst_le, align 4
13*9880d681SAndroid Build Coastguard Worker  ret i32 0
14*9880d681SAndroid Build Coastguard Worker}
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker@dst_ie = external thread_local global i32
17*9880d681SAndroid Build Coastguard Worker@src_ie = external thread_local global i32
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_initial_exec:
20*9880d681SAndroid Build Coastguard Worker; CHECK-DAG:   = memw(##src_ie@IE)
21*9880d681SAndroid Build Coastguard Worker; CHECK-DAG:   = memw(##dst_ie@IE)
22*9880d681SAndroid Build Coastguard Workerdefine i32 @test_initial_exec() nounwind {
23*9880d681SAndroid Build Coastguard Workerentry:
24*9880d681SAndroid Build Coastguard Worker  %0 = load i32, i32* @src_ie, align 4
25*9880d681SAndroid Build Coastguard Worker  store i32 %0, i32* @dst_ie, align 4
26*9880d681SAndroid Build Coastguard Worker  ret i32 0
27*9880d681SAndroid Build Coastguard Worker}
28*9880d681SAndroid Build Coastguard Worker
29