[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / AArch64 / SVE / cpy-diagnostics.s
blob8bc40d54c3dad6c48e03172035b0fd872a2d3ba3
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Invalid scalar operand for result element width.
6 cpy z0.b, p0/m, x0
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
8 // CHECK-NEXT: cpy z0.b, p0/m, x0
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11 cpy z0.h, p0/m, x0
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
13 // CHECK-NEXT: cpy z0.h, p0/m, x0
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16 cpy z0.s, p0/m, x0
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
18 // CHECK-NEXT: cpy z0.s, p0/m, x0
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 cpy z0.d, p0/m, w0
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
23 // CHECK-NEXT: cpy z0.d, p0/m, w0
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 cpy z0.b, p0/m, h0
27 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
28 // CHECK-NEXT: cpy z0.b, p0/m, h0
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31 cpy z0.b, p0/m, s0
32 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
33 // CHECK-NEXT: cpy z0.b, p0/m, s0
34 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
36 cpy z0.b, p0/m, d0
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
38 // CHECK-NEXT: cpy z0.b, p0/m, d0
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
41 cpy z0.h, p0/m, b0
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
43 // CHECK-NEXT: cpy z0.h, p0/m, b0
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
46 cpy z0.h, p0/m, s0
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
48 // CHECK-NEXT: cpy z0.h, p0/m, s0
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
51 cpy z0.h, p0/m, d0
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
53 // CHECK-NEXT: cpy z0.h, p0/m, d0
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
56 cpy z0.s, p0/m, b0
57 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
58 // CHECK-NEXT: cpy z0.s, p0/m, b0
59 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
61 cpy z0.s, p0/m, h0
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
63 // CHECK-NEXT: cpy z0.s, p0/m, h0
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
66 cpy z0.s, p0/m, d0
67 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
68 // CHECK-NEXT: cpy z0.s, p0/m, d0
69 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
71 cpy z0.d, p0/m, b0
72 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
73 // CHECK-NEXT: cpy z0.d, p0/m, b0
74 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
76 cpy z0.d, p0/m, h0
77 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
78 // CHECK-NEXT: cpy z0.d, p0/m, h0
79 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
81 cpy z0.d, p0/m, s0
82 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
83 // CHECK-NEXT: cpy z0.d, p0/m, s0
84 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
87 // --------------------------------------------------------------------------//
88 // Invalid immediates
90 cpy z0.b, p0/z, #0, lsl #8 // #0, lsl #8 is not valid for .b
91 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
92 // CHECK-NEXT: cpy z0.b, p0/z, #0, lsl #8
93 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
95 cpy z0.b, p0/z, #-1, lsl #8
96 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
97 // CHECK-NEXT: cpy z0.b, p0/z, #-1, lsl #8
98 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
100 cpy z0.b, p0/z, #256
101 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
102 // CHECK-NEXT: cpy z0.b, p0/z, #256
103 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
105 cpy z0.b, p0/z, #1, lsl #8
106 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
107 // CHECK-NEXT: cpy z0.b, p0/z, #1, lsl #8
108 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
110 cpy z0.h, p0/z, #-32769
111 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 65280]
112 // CHECK-NEXT: cpy z0.h, p0/z, #-32769
113 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
115 cpy z0.h, p0/z, #32513
116 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 65280]
117 // CHECK-NEXT: cpy z0.h, p0/z, #32513
118 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
120 cpy z0.h, p0/z, #65281
121 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 65280]
122 // CHECK-NEXT: cpy z0.h, p0/z, #65281
123 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
125 cpy z0.h, p0/z, #256, lsl #8
126 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 65280]
127 // CHECK-NEXT: cpy z0.h, p0/z, #256, lsl #8
128 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
130 cpy z0.s, p0/z, #-33024
131 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
132 // CHECK-NEXT: cpy z0.s, p0/z, #-33024
133 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
135 cpy z0.s, p0/z, #-32769
136 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
137 // CHECK-NEXT: cpy z0.s, p0/z, #-32769
138 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
140 cpy z0.s, p0/z, #-129, lsl #8
141 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
142 // CHECK-NEXT: cpy z0.s, p0/z, #-129, lsl #8
143 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
145 cpy z0.s, p0/z, #32513
146 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
147 // CHECK-NEXT: cpy z0.s, p0/z, #32513
148 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
150 cpy z0.s, p0/z, #32768
151 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
152 // CHECK-NEXT: cpy z0.s, p0/z, #32768
153 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
155 cpy z0.s, p0/z, #128, lsl #8
156 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
157 // CHECK-NEXT: cpy z0.s, p0/z, #128, lsl #8
158 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
160 cpy z0.d, p0/z, #-33024
161 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
162 // CHECK-NEXT: cpy z0.d, p0/z, #-33024
163 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
165 cpy z0.d, p0/z, #-32769
166 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
167 // CHECK-NEXT: cpy z0.d, p0/z, #-32769
168 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
170 cpy z0.d, p0/z, #-129, lsl #8
171 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
172 // CHECK-NEXT: cpy z0.d, p0/z, #-129, lsl #8
173 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
175 cpy z0.d, p0/z, #32513
176 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
177 // CHECK-NEXT: cpy z0.d, p0/z, #32513
178 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
180 cpy z0.d, p0/z, #32768
181 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
182 // CHECK-NEXT: cpy z0.d, p0/z, #32768
183 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
185 cpy z0.d, p0/z, #128, lsl #8
186 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
187 // CHECK-NEXT: cpy z0.d, p0/z, #128, lsl #8
188 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: