llvm/test/CodeGen/Mips/thread-pointer.ll
Marcin Koscielnicki 45c07d1520 [Mips] Add support for llvm.thread.pointer intrinsic.
This will be used to implement __builtin_thread_pointer in clang.

Differential Revision: http://reviews.llvm.org/D19569

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267743 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-27 17:21:49 +00:00

13 lines
348 B
LLVM

; RUN: llc -march=mips < %s | FileCheck %s
; RUN: llc -march=mips64 < %s | FileCheck %s
; RUN: llc -march=mipsel < %s | FileCheck %s
; RUN: llc -march=mips64el < %s | FileCheck %s
declare i8* @llvm.thread.pointer() nounwind readnone
define i8* @thread_pointer() {
; CHECK: rdhwr $3, $29
%1 = tail call i8* @llvm.thread.pointer()
ret i8* %1
}