| @@ -1,28 +1,27 @@ |
|
|
| 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 X86_64 Z13 |
|
2 |
+//@ compile-flags: -Copt-level=3 |
|
3 |
+//@[AARCH64] only-aarch64 |
|
4 |
+//@[X86_64] only-x86_64 |
|
5 |
+//@[Z13] only-s390x |
|
6 |
+//@[Z13] compile-flags: -Ctarget-cpu=z13 |
| 8 |
7 |
|
| 9 |
8 |
#![crate_type = "lib"] |
| 10 |
9 |
#![no_std] |
| 11 |
10 |
|
|
11 |
+// This test is paired with the arch-neutral -opt2.rs test |
|
12 |
+ |
| 12 |
13 |
// The code is from https://github.com/rust-lang/rust/issues/122805. |
| 13 |
14 |
// Ensure we do not generate the shufflevector instruction |
| 14 |
15 |
// to avoid complicating the code. |
|
16 |
+ |
| 15 |
17 |
// CHECK-LABEL: define{{.*}}void @convert( |
| 16 |
18 |
// CHECK-NOT: shufflevector |
|
19 |
+ |
| 17 |
20 |
// 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 |
|
21 |
+// CHECK: load <8 x i16> |
|
22 |
+// CHECK-NEXT: call <8 x i16> @llvm.bswap |
|
23 |
+// CHECK-NEXT: store <8 x i16> |
|
24 |
+// CHECK-NEXT: ret void |
| 26 |
25 |
#[no_mangle] |
| 27 |
26 |
pub fn convert(value: [u16; 8]) -> [u8; 16] { |
| 28 |
27 |
#[cfg(target_endian = "little")] |