Files
Matthias Braun 3a6f6d93bf X86: Do not use llc -march in tests.
`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
2017-08-02 00:28:10 +00:00

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