xref: /aosp_15_r20/external/llvm/test/CodeGen/Thumb2/tls1.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi | \
2*9880d681SAndroid Build Coastguard Worker; RUN:     grep "i(TPOFF)"
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi | \
4*9880d681SAndroid Build Coastguard Worker; RUN:     grep "__aeabi_read_tp"
5*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi \
6*9880d681SAndroid Build Coastguard Worker; RUN:     -relocation-model=pic | grep "__tls_get_addr"
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker@i = thread_local global i32 15		; <i32*> [#uses=2]
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Workerdefine i32 @f() {
12*9880d681SAndroid Build Coastguard Workerentry:
13*9880d681SAndroid Build Coastguard Worker	%tmp1 = load i32, i32* @i		; <i32> [#uses=1]
14*9880d681SAndroid Build Coastguard Worker	ret i32 %tmp1
15*9880d681SAndroid Build Coastguard Worker}
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Workerdefine i32* @g() {
18*9880d681SAndroid Build Coastguard Workerentry:
19*9880d681SAndroid Build Coastguard Worker	ret i32* @i
20*9880d681SAndroid Build Coastguard Worker}
21