mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 21:47:04 +00:00
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`.
This commit is contained in:
commit
f1b31ae8df
@ -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")]
|
||||
|
Loading…
Reference in New Issue
Block a user