[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / ld3d-diagnostics.s
blob280e196ecb662cb73bbcb2cf5cb0bad8e59f784a
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 ld3d {z12.d, z13.d, z14.d}, 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: ld3d {z12.d, z13.d, z14.d}, p4/z, [x12, #-27, MUL VL]
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12 ld3d {z7.d, z8.d, z9.d}, 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: ld3d {z7.d, z8.d, z9.d}, p3/z, [x1, #24, MUL VL]
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
18 // --------------------------------------------------------------------------//
19 // Immediate not a multiple of three.
21 ld3d {z12.d, z13.d, z14.d}, 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: ld3d {z12.d, z13.d, z14.d}, p4/z, [x12, #-7, MUL VL]
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 ld3d {z7.d, z8.d, z9.d}, 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: ld3d {z7.d, z8.d, z9.d}, p3/z, [x1, #5, MUL VL]
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
32 // --------------------------------------------------------------------------//
33 // Invalid scalar + scalar addressing modes
35 ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, x0]
36 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #3'
37 // CHECK-NEXT: ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, x0]
38 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40 ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, xzr]
41 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #3'
42 // CHECK-NEXT: ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, xzr]
43 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45 ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, x0, lsl #2]
46 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #3'
47 // CHECK-NEXT: ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, x0, lsl #2]
48 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50 ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, w0]
51 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #3'
52 // CHECK-NEXT: ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, w0]
53 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55 ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, w0, uxtw]
56 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #3'
57 // CHECK-NEXT: ld3d { z0.d, z1.d, z2.d }, p0/z, [x0, w0, uxtw]
58 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
61 // --------------------------------------------------------------------------//
62 // error: invalid restricted predicate register, expected p0..p7 (without element suffix)
64 ld3d {z2.d, z3.d, z4.d}, p8/z, [x15, #10, MUL VL]
65 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
66 // CHECK-NEXT: ld3d {z2.d, z3.d, z4.d}, p8/z, [x15, #10, MUL VL]
67 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
70 // --------------------------------------------------------------------------//
71 // Invalid vector list.
73 ld3d { }, p0/z, [x0]
74 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected
75 // CHECK-NEXT: ld3d { }, p0/z, [x0]
76 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
78 ld3d { z0.d, z1.d, z2.d, z3.d }, p0/z, [x0]
79 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
80 // CHECK-NEXT: ld3d { z0.d, z1.d, z2.d, z3.d }, p0/z, [x0]
81 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
83 ld3d { z0.d, z1.d, z2.b }, p0/z, [x0]
84 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: mismatched register size suffix
85 // CHECK-NEXT: ld3d { z0.d, z1.d, z2.b }, p0/z, [x0]
86 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
88 ld3d { z0.d, z1.d, z3.d }, p0/z, [x0]
89 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: registers must be sequential
90 // CHECK-NEXT: ld3d { z0.d, z1.d, z3.d }, p0/z, [x0]
91 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
93 ld3d { v0.2d, v1.2d, v2.2d }, p0/z, [x0]
94 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
95 // CHECK-NEXT: ld3d { v0.2d, v1.2d, v2.2d }, p0/z, [x0]
96 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
99 // --------------------------------------------------------------------------//
100 // Negative tests for instructions that are incompatible with movprfx
102 movprfx z21.d, p5/z, z28.d
103 ld3d { z21.d, z22.d, z23.d }, p5/z, [x10, #15, mul vl]
104 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
105 // CHECK-NEXT: ld3d { z21.d, z22.d, z23.d }, p5/z, [x10, #15, mul vl]
106 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
108 movprfx z21, z28
109 ld3d { z21.d, z22.d, z23.d }, p5/z, [x10, #15, mul vl]
110 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
111 // CHECK-NEXT: ld3d { z21.d, z22.d, z23.d }, p5/z, [x10, #15, mul vl]
112 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: