[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / ld3b-diagnostics.s
bloba550ed6b97f46db6bf99e216f738df995f0d062a
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
4 // --------------------------------------------------------------------------//
5 // Immediate out of lower bound [-24, 21].
7 ld3b {z12.b, z13.b, z14.b}, p4/z, [x12, #-27, MUL VL]
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 3 in range [-24, 21].
9 // CHECK-NEXT: ld3b {z12.b, z13.b, z14.b}, p4/z, [x12, #-27, MUL VL]
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12 ld3b {z7.b, z8.b, z9.b}, p3/z, [x1, #24, MUL VL]
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 3 in range [-24, 21].
14 // CHECK-NEXT: ld3b {z7.b, z8.b, z9.b}, p3/z, [x1, #24, MUL VL]
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
18 // --------------------------------------------------------------------------//
19 // Immediate not a multiple of three.
21 ld3b {z12.b, z13.b, z14.b}, p4/z, [x12, #-7, MUL VL]
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 3 in range [-24, 21].
23 // CHECK-NEXT: ld3b {z12.b, z13.b, z14.b}, p4/z, [x12, #-7, MUL VL]
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 ld3b {z7.b, z8.b, z9.b}, p3/z, [x1, #5, MUL VL]
27 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 3 in range [-24, 21].
28 // CHECK-NEXT: ld3b {z7.b, z8.b, z9.b}, p3/z, [x1, #5, MUL VL]
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
32 // --------------------------------------------------------------------------//
33 // Invalid scalar + scalar addressing modes
35 ld3b { z0.b, z1.b, z2.b }, p0/z, [x0, xzr]
36 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 without shift
37 // CHECK-NEXT: ld3b { z0.b, z1.b, z2.b }, p0/z, [x0, xzr]
38 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40 ld3b { z0.b, z1.b, z2.b }, p0/z, [x0, x0, lsl #1]
41 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 without shift
42 // CHECK-NEXT: ld3b { z0.b, z1.b, z2.b }, p0/z, [x0, x0, lsl #1]
43 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45 ld3b { z0.b, z1.b, z2.b }, p0/z, [x0, w0]
46 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 without shift
47 // CHECK-NEXT: ld3b { z0.b, z1.b, z2.b }, p0/z, [x0, w0]
48 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50 ld3b { z0.b, z1.b, z2.b }, p0/z, [x0, w0, uxtw]
51 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 without shift
52 // CHECK-NEXT: ld3b { z0.b, z1.b, z2.b }, p0/z, [x0, w0, uxtw]
53 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
56 // --------------------------------------------------------------------------//
57 // error: invalid restricted predicate register, expected p0..p7 (without element suffix)
59 ld3b {z2.b, z3.b, z4.b}, p8/z, [x15, #10, MUL VL]
60 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
61 // CHECK-NEXT: ld3b {z2.b, z3.b, z4.b}, p8/z, [x15, #10, MUL VL]
62 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
65 // --------------------------------------------------------------------------//
66 // Invalid vector list.
68 ld3b { }, p0/z, [x0]
69 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected
70 // CHECK-NEXT: ld3b { }, p0/z, [x0]
71 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
73 ld3b { z0.b, z1.b, z2.b, z3.b }, p0/z, [x0]
74 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
75 // CHECK-NEXT: ld3b { z0.b, z1.b, z2.b, z3.b }, p0/z, [x0]
76 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
78 ld3b { z0.b, z1.b, z2.h }, p0/z, [x0]
79 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: mismatched register size suffix
80 // CHECK-NEXT: ld3b { z0.b, z1.b, z2.h }, p0/z, [x0]
81 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
83 ld3b { z0.b, z1.b, z3.b }, p0/z, [x0]
84 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: registers must be sequential
85 // CHECK-NEXT: ld3b { z0.b, z1.b, z3.b }, p0/z, [x0]
86 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
88 ld3b { v0.16b, v1.16b, v2.16b }, p0/z, [x0]
89 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
90 // CHECK-NEXT: ld3b { v0.16b, v1.16b, v2.16b }, p0/z, [x0]
91 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
94 // --------------------------------------------------------------------------//
95 // Negative tests for instructions that are incompatible with movprfx
97 movprfx z21.b, p5/z, z28.b
98 ld3b { z21.b, z22.b, z23.b }, p5/z, [x10, #15, mul vl]
99 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
100 // CHECK-NEXT: ld3b { z21.b, z22.b, z23.b }, p5/z, [x10, #15, mul vl]
101 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
103 movprfx z21, z28
104 ld3b { z21.b, z22.b, z23.b }, p5/z, [x10, #15, mul vl]
105 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
106 // CHECK-NEXT: ld3b { z21.b, z22.b, z23.b }, p5/z, [x10, #15, mul vl]
107 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: