mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 19:25:26 -04:00
3a6f6d93bf
`llc -march` is problematic because it only switches the target architecture, but leaves the operating system unchanged. This occasionally leads to indeterministic tests because the OS from LLVM_DEFAULT_TARGET_TRIPLE is used. However we can simply always use `llc -mtriple` instead. This changes all the tests to do this to avoid people using -march when they copy and paste parts of tests. See also the discussion in https://reviews.llvm.org/D35287 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309774 91177308-0d34-0410-b5e6-96231b3b80d8
58 lines
1.5 KiB
LLVM
58 lines
1.5 KiB
LLVM
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx-i -mattr=fsgsbase | FileCheck %s
|
|
|
|
define i32 @test_x86_rdfsbase_32() {
|
|
; CHECK: rdfsbasel
|
|
%res = call i32 @llvm.x86.rdfsbase.32()
|
|
ret i32 %res
|
|
}
|
|
declare i32 @llvm.x86.rdfsbase.32() nounwind readnone
|
|
|
|
define i32 @test_x86_rdgsbase_32() {
|
|
; CHECK: rdgsbasel
|
|
%res = call i32 @llvm.x86.rdgsbase.32()
|
|
ret i32 %res
|
|
}
|
|
declare i32 @llvm.x86.rdgsbase.32() nounwind readnone
|
|
|
|
define i64 @test_x86_rdfsbase_64() {
|
|
; CHECK: rdfsbaseq
|
|
%res = call i64 @llvm.x86.rdfsbase.64()
|
|
ret i64 %res
|
|
}
|
|
declare i64 @llvm.x86.rdfsbase.64() nounwind readnone
|
|
|
|
define i64 @test_x86_rdgsbase_64() {
|
|
; CHECK: rdgsbaseq
|
|
%res = call i64 @llvm.x86.rdgsbase.64()
|
|
ret i64 %res
|
|
}
|
|
declare i64 @llvm.x86.rdgsbase.64() nounwind readnone
|
|
|
|
define void @test_x86_wrfsbase_32(i32 %x) {
|
|
; CHECK: wrfsbasel
|
|
call void @llvm.x86.wrfsbase.32(i32 %x)
|
|
ret void
|
|
}
|
|
declare void @llvm.x86.wrfsbase.32(i32) nounwind readnone
|
|
|
|
define void @test_x86_wrgsbase_32(i32 %x) {
|
|
; CHECK: wrgsbasel
|
|
call void @llvm.x86.wrgsbase.32(i32 %x)
|
|
ret void
|
|
}
|
|
declare void @llvm.x86.wrgsbase.32(i32) nounwind readnone
|
|
|
|
define void @test_x86_wrfsbase_64(i64 %x) {
|
|
; CHECK: wrfsbaseq
|
|
call void @llvm.x86.wrfsbase.64(i64 %x)
|
|
ret void
|
|
}
|
|
declare void @llvm.x86.wrfsbase.64(i64) nounwind readnone
|
|
|
|
define void @test_x86_wrgsbase_64(i64 %x) {
|
|
; CHECK: wrgsbaseq
|
|
call void @llvm.x86.wrgsbase.64(i64 %x)
|
|
ret void
|
|
}
|
|
declare void @llvm.x86.wrgsbase.64(i64) nounwind readnone
|