summaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC/thread-pointer.ll
blob: 33e99aa94747e83dcbf6e8c37f77ceaa6b70e0fa (plain)
1
2
3
4
5
6
7
8
9
10
11
; RUN: llc < %s -mtriple=sparc-unknown-linux-gnu | FileCheck %s
; RUN: llc < %s -mtriple=sparc64-unknown-linux-gnu | FileCheck %s

; Function Attrs: nounwind readnone
declare i8* @llvm.thread.pointer() #1

define i8* @thread_pointer() {
; CHECK: mov %g7, %o0
  %1 = tail call i8* @llvm.thread.pointer()
  ret i8* %1
}