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