mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Both AArch64 and ARM support llvm.<arch>.thread.pointer intrinsics that just return the thread pointer. I have a pending patch that does the same for SystemZ (D19054), and there are many more targets that could benefit from one. This patch merges the ARM and AArch64 intrinsics into a single target independent one that will also be used by subsequent targets. Differential Revision: http://reviews.llvm.org/D19098 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266818 91177308-0d34-0410-b5e6-96231b3b80d8
11 lines
235 B
LLVM
11 lines
235 B
LLVM
; RUN: llc < %s -march=arm -mtriple=arm-linux-gnueabi | \
|
|
; RUN: grep "__aeabi_read_tp"
|
|
|
|
define i8* @test() {
|
|
entry:
|
|
%tmp1 = call i8* @llvm.thread.pointer( ) ; <i8*> [#uses=0]
|
|
ret i8* %tmp1
|
|
}
|
|
|
|
declare i8* @llvm.thread.pointer()
|