[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / lsl-diagnostics.s
blobd2e3c4f42cc7e7a02bc3b2798b3b5d79a6b576e0
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 lsl z18.b, z28.b, #-1
4 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
5 // CHECK-NEXT: lsl z18.b, z28.b, #-1
6 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
8 lsl z1.b, z9.b, #8
9 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
10 // CHECK-NEXT: lsl z1.b, z9.b, #8
11 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
13 lsl z18.b, p0/m, z28.b, #-1
14 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
15 // CHECK-NEXT: lsl z18.b, p0/m, z28.b, #-1
16 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
18 lsl z1.b, p0/m, z9.b, #8
19 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
20 // CHECK-NEXT: lsl z1.b, p0/m, z9.b, #8
21 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
23 lsl z21.h, z2.h, #-1
24 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
25 // CHECK-NEXT: lsl z21.h, z2.h, #-1
26 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
28 lsl z14.h, z30.h, #16
29 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
30 // CHECK-NEXT: lsl z14.h, z30.h, #16
31 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
33 lsl z21.h, p0/m, z2.h, #-1
34 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
35 // CHECK-NEXT: lsl z21.h, p0/m, z2.h, #-1
36 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
38 lsl z14.h, p0/m, z30.h, #16
39 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
40 // CHECK-NEXT: lsl z14.h, p0/m, z30.h, #16
41 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
43 lsl z6.s, z12.s, #-1
44 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
45 // CHECK-NEXT: lsl z6.s, z12.s, #-1
46 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
48 lsl z23.s, z19.s, #32
49 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
50 // CHECK-NEXT: lsl z23.s, z19.s, #32
51 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
53 lsl z6.s, p0/m, z12.s, #-1
54 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
55 // CHECK-NEXT: lsl z6.s, p0/m, z12.s, #-1
56 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
58 lsl z23.s, p0/m, z19.s, #32
59 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
60 // CHECK-NEXT: lsl z23.s, p0/m, z19.s, #32
61 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
63 lsl z3.d, z24.d, #-1
64 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63]
65 // CHECK-NEXT: lsl z3.d, z24.d, #-1
66 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
68 lsl z25.d, z16.d, #64
69 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63]
70 // CHECK-NEXT: lsl z25.d, z16.d, #64
71 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
73 lsl z3.d, p0/m, z24.d, #-1
74 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63]
75 // CHECK-NEXT: lsl z3.d, p0/m, z24.d, #-1
76 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
78 lsl z25.d, p0/m, z16.d, #64
79 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63]
80 // CHECK-NEXT: lsl z25.d, p0/m, z16.d, #64
81 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
84 // --------------------------------------------------------------------------//
85 // Source and Destination Registers must match
87 lsl z0.b, p0/m, z1.b, z2.b
88 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: operand must match destination register
89 // CHECK-NEXT: lsl z0.b, p0/m, z1.b, z2.b
90 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
92 lsl z0.b, p0/m, z1.b, #1
93 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: operand must match destination register
94 // CHECK-NEXT: lsl z0.b, p0/m, z1.b, #1
95 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
98 // --------------------------------------------------------------------------//
99 // Element sizes must match
101 lsl z0.b, z0.d, z1.d
102 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
103 // CHECK-NEXT: lsl z0.b, z0.d, z1.d
104 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
106 lsl z0.b, p0/m, z0.d, z1.d
107 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
108 // CHECK-NEXT: lsl z0.b, p0/m, z0.d, z1.d
109 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
111 lsl z0.b, p0/m, z0.b, z1.h
112 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
113 // CHECK-NEXT: lsl z0.b, p0/m, z0.b, z1.h
114 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
116 // --------------------------------------------------------------------------//
117 // Predicate not in restricted predicate range
119 lsl z0.b, p8/m, z0.b, z1.b
120 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
121 // CHECK-NEXT: lsl z0.b, p8/m, z0.b, z1.b
122 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
125 // --------------------------------------------------------------------------//
126 // Negative tests for instructions that are incompatible with movprfx
128 movprfx z31.d, p0/z, z6.d
129 lsl z31.d, z31.d, #63
130 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
131 // CHECK-NEXT: lsl z31.d, z31.d, #63
132 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
134 movprfx z31, z6
135 lsl z31.d, z31.d, #63
136 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
137 // CHECK-NEXT: lsl z31.d, z31.d, #63
138 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
140 movprfx z0.s, p0/z, z7.s
141 lsl z0.s, z1.s, z2.d
142 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
143 // CHECK-NEXT: lsl z0.s, z1.s, z2.d
144 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
146 movprfx z0, z7
147 lsl z0.s, z1.s, z2.d
148 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
149 // CHECK-NEXT: lsl z0.s, z1.s, z2.d
150 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: