diff options
| author | Chris Denton <christophersdenton@gmail.com> | 2025-04-13 11:48:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-13 11:48:16 +0000 |
| commit | f1b31ae8df229535b845d3fd2e1dea19229ab428 (patch) | |
| tree | 2e9367d0e7d02df81d669d1b6c20ee6c8bccba74 | |
| parent | 9d2d6a040f369ac7afcde38f08a8c74a558879e2 (diff) | |
| parent | 15e1a6676cdaac8442959990806d33a40949aaca (diff) | |
| download | rust-f1b31ae8df229535b845d3fd2e1dea19229ab428.tar.gz rust-f1b31ae8df229535b845d3fd2e1dea19229ab428.zip | |
Rollup merge of #139177 - fneddy:fix_s390x_codegen_bswap, r=Mark-Simulacrum
Use -C target-cpu=z13 on s390x vector test currently we see a regression in the `dont-shuffle-bswaps.rs` on s390x. This is due to, the default s390x cpu is set to z10 [here](https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs#L9) which does not have vector instructions implemented. To make the test pass we need to create an extra test revision and set target-cpu at least to `z13`.
| -rw-r--r-- | tests/codegen/dont-shuffle-bswaps.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/codegen/dont-shuffle-bswaps.rs b/tests/codegen/dont-shuffle-bswaps.rs index e100474f606..c1dab2bc295 100644 --- a/tests/codegen/dont-shuffle-bswaps.rs +++ b/tests/codegen/dont-shuffle-bswaps.rs @@ -1,8 +1,11 @@ -//@ revisions: OPT2 OPT3 +//@ revisions: OPT2 OPT3 OPT3_S390X //@[OPT2] compile-flags: -Copt-level=2 //@[OPT3] compile-flags: -C opt-level=3 // some targets don't do the opt we are looking for //@[OPT3] only-64bit +//@[OPT3] ignore-s390x +//@[OPT3_S390X] compile-flags: -C opt-level=3 -C target-cpu=z13 +//@[OPT3_S390X] only-s390x #![crate_type = "lib"] #![no_std] @@ -17,6 +20,10 @@ // OPT3-NEXT: call <8 x i16> @llvm.bswap // OPT3-NEXT: store <8 x i16> // OPT3-NEXT: ret void +// OPT3_S390X: load <8 x i16> +// OPT3_S390X-NEXT: call <8 x i16> @llvm.bswap +// OPT3_S390X-NEXT: store <8 x i16> +// OPT3_S390X-NEXT: ret void #[no_mangle] pub fn convert(value: [u16; 8]) -> [u8; 16] { #[cfg(target_endian = "little")] |
