[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / ld1rsh-diagnostics.s
blob8911ba18bc289bcd907e917e903ee51149b1e950
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Invalid immediate (multiple of 2 in range [0, 126]).
6 ld1rsh z0.s, p1/z, [x0, #-2]
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 2 in range [0, 126].
8 // CHECK-NEXT: ld1rsh z0.s, p1/z, [x0, #-2]
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11 ld1rsh z0.s, p1/z, [x0, #128]
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 2 in range [0, 126].
13 // CHECK-NEXT: ld1rsh z0.s, p1/z, [x0, #128]
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16 ld1rsh z0.s, p1/z, [x0, #3]
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 2 in range [0, 126].
18 // CHECK-NEXT: ld1rsh z0.s, p1/z, [x0, #3]
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
22 // --------------------------------------------------------------------------//
23 // Invalid result vector element size
25 ld1rsh z0.b, p1/z, [x0]
26 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
27 // CHECK-NEXT: ld1rsh z0.b, p1/z, [x0]
28 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
30 ld1rsh z0.h, p1/z, [x0]
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
32 // CHECK-NEXT: ld1rsh z0.h, p1/z, [x0]
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
36 // --------------------------------------------------------------------------//
37 // restricted predicate has range [0, 7].
39 ld1rsh z0.s, p8/z, [x0]
40 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
41 // CHECK-NEXT: ld1rsh z0.s, p8/z, [x0]
42 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45 // --------------------------------------------------------------------------//
46 // Negative tests for instructions that are incompatible with movprfx
48 movprfx z31.d, p7/z, z6.d
49 ld1rsh { z31.d }, p7/z, [sp, #126]
50 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
51 // CHECK-NEXT: ld1rsh { z31.d }, p7/z, [sp, #126]
52 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
54 movprfx z31, z6
55 ld1rsh { z31.d }, p7/z, [sp, #126]
56 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
57 // CHECK-NEXT: ld1rsh { z31.d }, p7/z, [sp, #126]
58 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: