mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-14 04:56:49 +00:00
Use explicit cpu in some asm and codegen tests.
Some tests expect to be compiled for a specific CPU or require certain target features to be present (or absent). These tests work fine with default CPUs but fail in downstream builds for RHEL and Fedora, where we use non-default CPUs such as z13 on s390x, pwr9 on ppc64le, or x86-64-v2/x86-64-v3 on x86_64.
This commit is contained in:
parent
a7fc463dd8
commit
20432c9eee
@ -6,7 +6,7 @@
|
||||
//@[elfv1-be] needs-llvm-components: powerpc
|
||||
//@[elfv2-be] compile-flags: --target powerpc64-unknown-linux-musl
|
||||
//@[elfv2-be] needs-llvm-components: powerpc
|
||||
//@[elfv2-le] compile-flags: --target powerpc64le-unknown-linux-gnu
|
||||
//@[elfv2-le] compile-flags: --target powerpc64le-unknown-linux-gnu -C target-cpu=pwr8
|
||||
//@[elfv2-le] needs-llvm-components: powerpc
|
||||
//@[aix] compile-flags: --target powerpc64-ibm-aix
|
||||
//@[aix] needs-llvm-components: powerpc
|
||||
|
@ -2,9 +2,9 @@
|
||||
// ignore-tidy-linelength
|
||||
//@ assembly-output: emit-asm
|
||||
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
|
||||
//@[z10] compile-flags: --target s390x-unknown-linux-gnu --cfg no_vector
|
||||
//@[z10] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z10 --cfg no_vector
|
||||
//@[z10] needs-llvm-components: systemz
|
||||
//@[z10_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=+vector
|
||||
//@[z10_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z10 -C target-feature=+vector
|
||||
//@[z10_vector] needs-llvm-components: systemz
|
||||
//@[z13] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13
|
||||
//@[z13] needs-llvm-components: systemz
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: s390x
|
||||
//@[s390x] compile-flags: --target s390x-unknown-linux-gnu
|
||||
//@[s390x] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z10
|
||||
//@[s390x] needs-llvm-components: systemz
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ only-x86_64
|
||||
//@ compile-flags: -C opt-level=3
|
||||
//@ compile-flags: -C opt-level=3 -C target-cpu=x86-64
|
||||
#![crate_type = "lib"]
|
||||
|
||||
/// Check that the fast-path of `is_ascii` uses a `pmovmskb` instruction.
|
||||
|
@ -1,6 +1,7 @@
|
||||
//@ only-x86_64
|
||||
//@ build-pass
|
||||
//@ ignore-pass (test emits codegen-time warnings)
|
||||
//@ compile-flags: -C target-feature=-avx
|
||||
|
||||
#![feature(avx512_target_feature)]
|
||||
#![feature(portable_simd)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:64:11
|
||||
--> $DIR/simd-abi-checks-avx.rs:65:11
|
||||
|
|
||||
LL | f(g());
|
||||
| ^^^ function called here
|
||||
@ -10,7 +10,7 @@ LL | f(g());
|
||||
= note: `#[warn(abi_unsupported_vector_types)]` on by default
|
||||
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:64:9
|
||||
--> $DIR/simd-abi-checks-avx.rs:65:9
|
||||
|
|
||||
LL | f(g());
|
||||
| ^^^^^^ function called here
|
||||
@ -20,7 +20,7 @@ LL | f(g());
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:72:14
|
||||
--> $DIR/simd-abi-checks-avx.rs:73:14
|
||||
|
|
||||
LL | gavx(favx());
|
||||
| ^^^^^^ function called here
|
||||
@ -30,7 +30,7 @@ LL | gavx(favx());
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:72:9
|
||||
--> $DIR/simd-abi-checks-avx.rs:73:9
|
||||
|
|
||||
LL | gavx(favx());
|
||||
| ^^^^^^^^^^^^ function called here
|
||||
@ -40,7 +40,7 @@ LL | gavx(favx());
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:84:19
|
||||
--> $DIR/simd-abi-checks-avx.rs:85:19
|
||||
|
|
||||
LL | w(Wrapper(g()));
|
||||
| ^^^ function called here
|
||||
@ -50,7 +50,7 @@ LL | w(Wrapper(g()));
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function call uses SIMD vector type `Wrapper` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:84:9
|
||||
--> $DIR/simd-abi-checks-avx.rs:85:9
|
||||
|
|
||||
LL | w(Wrapper(g()));
|
||||
| ^^^^^^^^^^^^^^^ function called here
|
||||
@ -60,7 +60,7 @@ LL | w(Wrapper(g()));
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:100:9
|
||||
--> $DIR/simd-abi-checks-avx.rs:101:9
|
||||
|
|
||||
LL | some_extern();
|
||||
| ^^^^^^^^^^^^^ function called here
|
||||
@ -70,7 +70,7 @@ LL | some_extern();
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function definition uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
|
||||
--> $DIR/simd-abi-checks-avx.rs:27:1
|
||||
--> $DIR/simd-abi-checks-avx.rs:28:1
|
||||
|
|
||||
LL | unsafe extern "C" fn g() -> __m256 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
||||
@ -80,7 +80,7 @@ LL | unsafe extern "C" fn g() -> __m256 {
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function definition uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
|
||||
--> $DIR/simd-abi-checks-avx.rs:21:1
|
||||
--> $DIR/simd-abi-checks-avx.rs:22:1
|
||||
|
|
||||
LL | unsafe extern "C" fn f(_: __m256) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
||||
@ -90,7 +90,7 @@ LL | unsafe extern "C" fn f(_: __m256) {
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function definition uses SIMD vector type `Wrapper` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
|
||||
--> $DIR/simd-abi-checks-avx.rs:15:1
|
||||
--> $DIR/simd-abi-checks-avx.rs:16:1
|
||||
|
|
||||
LL | unsafe extern "C" fn w(_: Wrapper) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
||||
@ -100,7 +100,7 @@ LL | unsafe extern "C" fn w(_: Wrapper) {
|
||||
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
|
||||
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:57:8
|
||||
--> $DIR/simd-abi-checks-avx.rs:58:8
|
||||
|
|
||||
LL | || g()
|
||||
| ^^^ function called here
|
||||
@ -113,7 +113,7 @@ warning: 11 warnings emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:64:11
|
||||
--> $DIR/simd-abi-checks-avx.rs:65:11
|
||||
|
|
||||
LL | f(g());
|
||||
| ^^^ function called here
|
||||
@ -125,7 +125,7 @@ LL | f(g());
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:64:9
|
||||
--> $DIR/simd-abi-checks-avx.rs:65:9
|
||||
|
|
||||
LL | f(g());
|
||||
| ^^^^^^ function called here
|
||||
@ -137,7 +137,7 @@ LL | f(g());
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:72:14
|
||||
--> $DIR/simd-abi-checks-avx.rs:73:14
|
||||
|
|
||||
LL | gavx(favx());
|
||||
| ^^^^^^ function called here
|
||||
@ -149,7 +149,7 @@ LL | gavx(favx());
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:72:9
|
||||
--> $DIR/simd-abi-checks-avx.rs:73:9
|
||||
|
|
||||
LL | gavx(favx());
|
||||
| ^^^^^^^^^^^^ function called here
|
||||
@ -161,7 +161,7 @@ LL | gavx(favx());
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:84:19
|
||||
--> $DIR/simd-abi-checks-avx.rs:85:19
|
||||
|
|
||||
LL | w(Wrapper(g()));
|
||||
| ^^^ function called here
|
||||
@ -173,7 +173,7 @@ LL | w(Wrapper(g()));
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function call uses SIMD vector type `Wrapper` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:84:9
|
||||
--> $DIR/simd-abi-checks-avx.rs:85:9
|
||||
|
|
||||
LL | w(Wrapper(g()));
|
||||
| ^^^^^^^^^^^^^^^ function called here
|
||||
@ -185,7 +185,7 @@ LL | w(Wrapper(g()));
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:100:9
|
||||
--> $DIR/simd-abi-checks-avx.rs:101:9
|
||||
|
|
||||
LL | some_extern();
|
||||
| ^^^^^^^^^^^^^ function called here
|
||||
@ -197,7 +197,7 @@ LL | some_extern();
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function definition uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
|
||||
--> $DIR/simd-abi-checks-avx.rs:27:1
|
||||
--> $DIR/simd-abi-checks-avx.rs:28:1
|
||||
|
|
||||
LL | unsafe extern "C" fn g() -> __m256 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
||||
@ -209,7 +209,7 @@ LL | unsafe extern "C" fn g() -> __m256 {
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function definition uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
|
||||
--> $DIR/simd-abi-checks-avx.rs:21:1
|
||||
--> $DIR/simd-abi-checks-avx.rs:22:1
|
||||
|
|
||||
LL | unsafe extern "C" fn f(_: __m256) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
||||
@ -221,7 +221,7 @@ LL | unsafe extern "C" fn f(_: __m256) {
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function definition uses SIMD vector type `Wrapper` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
|
||||
--> $DIR/simd-abi-checks-avx.rs:15:1
|
||||
--> $DIR/simd-abi-checks-avx.rs:16:1
|
||||
|
|
||||
LL | unsafe extern "C" fn w(_: Wrapper) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
||||
@ -233,7 +233,7 @@ LL | unsafe extern "C" fn w(_: Wrapper) {
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
|
||||
--> $DIR/simd-abi-checks-avx.rs:57:8
|
||||
--> $DIR/simd-abi-checks-avx.rs:58:8
|
||||
|
|
||||
LL | || g()
|
||||
| ^^^ function called here
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ add-core-stubs
|
||||
//@ revisions: z10 z13_no_vector z13_soft_float
|
||||
//@ build-fail
|
||||
//@[z10] compile-flags: --target s390x-unknown-linux-gnu
|
||||
//@[z10] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z10
|
||||
//@[z10] needs-llvm-components: systemz
|
||||
//@[z13_no_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13 -C target-feature=-vector
|
||||
//@[z13_no_vector] needs-llvm-components: systemz
|
||||
|
Loading…
Reference in New Issue
Block a user