Skip to content

Commit 53e75a5

Browse files
authored
Unrolled build for rust-lang#139177
Rollup merge of rust-lang#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`.
2 parents 53d4476 + 15e1a66 commit 53e75a5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/codegen/dont-shuffle-bswaps.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
//@ revisions: OPT2 OPT3
1+
//@ revisions: OPT2 OPT3 OPT3_S390X
22
//@[OPT2] compile-flags: -Copt-level=2
33
//@[OPT3] compile-flags: -C opt-level=3
44
// some targets don't do the opt we are looking for
55
//@[OPT3] only-64bit
6+
//@[OPT3] ignore-s390x
7+
//@[OPT3_S390X] compile-flags: -C opt-level=3 -C target-cpu=z13
8+
//@[OPT3_S390X] only-s390x
69

710
#![crate_type = "lib"]
811
#![no_std]
@@ -17,6 +20,10 @@
1720
// OPT3-NEXT: call <8 x i16> @llvm.bswap
1821
// OPT3-NEXT: store <8 x i16>
1922
// OPT3-NEXT: ret void
23+
// OPT3_S390X: load <8 x i16>
24+
// OPT3_S390X-NEXT: call <8 x i16> @llvm.bswap
25+
// OPT3_S390X-NEXT: store <8 x i16>
26+
// OPT3_S390X-NEXT: ret void
2027
#[no_mangle]
2128
pub fn convert(value: [u16; 8]) -> [u8; 16] {
2229
#[cfg(target_endian = "little")]

0 commit comments

Comments
 (0)