llvm/test/CodeGen/SPARC/thread-pointer.ll
Marcin Koscielnicki 79b1c77d12 [SPARC] Add support for llvm.thread.pointer.
Differential Revision: http://reviews.llvm.org/D19387

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267544 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-26 10:37:01 +00:00

12 lines
318 B
LLVM

; 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
}