mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
0919e582e6
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 llvm-svn: 266818
20 lines
473 B
LLVM
20 lines
473 B
LLVM
; Test autoupgrade of arch-specific thread pointer intrinsics
|
|
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
|
|
declare i8* @llvm.aarch64.thread.pointer()
|
|
declare i8* @llvm.arm.thread.pointer()
|
|
|
|
define i8* @test1() {
|
|
; CHECK: test1()
|
|
; CHECK: call i8* @llvm.thread.pointer()
|
|
%1 = call i8* @llvm.aarch64.thread.pointer()
|
|
ret i8 *%1
|
|
}
|
|
|
|
define i8* @test2() {
|
|
; CHECK: test2()
|
|
; CHECK: call i8* @llvm.thread.pointer()
|
|
%1 = call i8* @llvm.arm.thread.pointer()
|
|
ret i8 *%1
|
|
}
|