xref: /aosp_15_r20/external/llvm/test/CodeGen/SPARC/thread-pointer.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=sparc-unknown-linux-gnu | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=sparc64-unknown-linux-gnu | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone
5*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.thread.pointer() #1
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine i8* @thread_pointer() {
8*9880d681SAndroid Build Coastguard Worker; CHECK: mov %g7, %o0
9*9880d681SAndroid Build Coastguard Worker  %1 = tail call i8* @llvm.thread.pointer()
10*9880d681SAndroid Build Coastguard Worker  ret i8* %1
11*9880d681SAndroid Build Coastguard Worker}
12