|
1 |
| -//@ revisions: OPT3 OPT3_S390X |
2 |
| -//@[OPT3] compile-flags: -C opt-level=3 |
3 |
| -// some targets don't do the opt we are looking for |
4 |
| -//@[OPT3] only-64bit |
5 |
| -//@[OPT3] ignore-s390x |
6 |
| -//@[OPT3_S390X] compile-flags: -C opt-level=3 -C target-cpu=z13 |
7 |
| -//@[OPT3_S390X] only-s390x |
| 1 | +//@ revisions: AARCH64 POWER9 X86_64 Z13 |
| 2 | +//@ compile-flags: -Copt-level=3 |
| 3 | +//@[AARCH64] only-aarch64 |
| 4 | +//@[POWER9] only-powerpc64 |
| 5 | +//@[POWER9] compile-flags: -Ctarget-cpu=power9 |
| 6 | +//@[X86_64] only-x86_64 |
| 7 | +//@[Z13] only-s390x |
| 8 | +//@[Z13] compile-flags: -Ctarget-cpu=z13 |
8 | 9 |
|
9 | 10 | #![crate_type = "lib"]
|
10 | 11 | #![no_std]
|
11 | 12 |
|
| 13 | +// This test is paired with the arch-neutral -opt2.rs test |
| 14 | + |
12 | 15 | // The code is from https://github.com/rust-lang/rust/issues/122805.
|
13 | 16 | // Ensure we do not generate the shufflevector instruction
|
14 | 17 | // to avoid complicating the code.
|
| 18 | + |
15 | 19 | // CHECK-LABEL: define{{.*}}void @convert(
|
16 | 20 | // CHECK-NOT: shufflevector
|
| 21 | + |
17 | 22 | // On higher opt levels, this should just be a bswap:
|
18 |
| -// OPT3: load <8 x i16> |
19 |
| -// OPT3-NEXT: call <8 x i16> @llvm.bswap |
20 |
| -// OPT3-NEXT: store <8 x i16> |
21 |
| -// OPT3-NEXT: ret void |
22 |
| -// OPT3_S390X: load <8 x i16> |
23 |
| -// OPT3_S390X-NEXT: call <8 x i16> @llvm.bswap |
24 |
| -// OPT3_S390X-NEXT: store <8 x i16> |
25 |
| -// OPT3_S390X-NEXT: ret void |
| 23 | +// CHECK: load <8 x i16> |
| 24 | +// CHECK-NEXT: call <8 x i16> @llvm.bswap |
| 25 | +// CHECK-NEXT: store <8 x i16> |
| 26 | +// CHECK-NEXT: ret void |
26 | 27 | #[no_mangle]
|
27 | 28 | pub fn convert(value: [u16; 8]) -> [u8; 16] {
|
28 | 29 | #[cfg(target_endian = "little")]
|
|
0 commit comments