xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/pr15359.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -mcpu=pwr7 -filetype=obj %s -o - | \
2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-readobj -t | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-p:64:64:64-S0-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-n32:64"
5*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-unknown-linux-gnu"
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker@nextIdx = external thread_local global i32
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Workerdefine fastcc void @func() nounwind {
10*9880d681SAndroid Build Coastguard Workerentry:
11*9880d681SAndroid Build Coastguard Worker  store i32 42, i32* @nextIdx
12*9880d681SAndroid Build Coastguard Worker  ret void
13*9880d681SAndroid Build Coastguard Worker}
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker; Verify that nextIdx has symbol type TLS.
16*9880d681SAndroid Build Coastguard Worker;
17*9880d681SAndroid Build Coastguard Worker; CHECK:      Symbol {
18*9880d681SAndroid Build Coastguard Worker; CHECK:        Name: nextIdx
19*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   Value:
20*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   Size:
21*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   Binding:
22*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   Type: TLS
23