mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-14 21:16:50 +00:00
Fix target-feature inline test to be less flaky
This commit is contained in:
parent
ef031c854d
commit
5339d4ef5b
@ -12,7 +12,7 @@ use std::arch::x86_64::*;
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[target_feature(enable = "avx")]
|
||||
fn with_avx(x: __m256) -> __m256 {
|
||||
// CHECK: fadd
|
||||
// CHECK: fadd <8 x float>
|
||||
let add = {
|
||||
#[inline(always)]
|
||||
|x, y| unsafe { _mm256_add_ps(x, y) }
|
||||
@ -24,14 +24,10 @@ fn with_avx(x: __m256) -> __m256 {
|
||||
#[no_mangle]
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
unsafe fn without_avx(x: __m256) -> __m256 {
|
||||
// CHECK-NOT: fadd
|
||||
// CHECK-NOT: fadd <8 x float>
|
||||
let add = {
|
||||
#[inline(always)]
|
||||
|x, y| unsafe { _mm256_add_ps(x, y) }
|
||||
};
|
||||
add(x, x)
|
||||
}
|
||||
|
||||
// Don't allow the above CHECK-NOT to accidentally match a commit hash in the
|
||||
// compiler version.
|
||||
// CHECK-LABEL: rustc version
|
||||
|
Loading…
Reference in New Issue
Block a user