Skip to content

Commit 161fe53

Browse files
committed
Use -C target-cpu=z13 on s390x vector test
The default s390x cpu(z10) does not have vector support. Setting target-cpu at least to z13 enables vectorisation for s390x architecture and makes the tests pass.
1 parent 2a06022 commit 161fe53

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
//@ min-llvm-version: 18.1.3
710

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

0 commit comments

Comments
 (0)