[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AArch64 / SVE / cpy-diagnostics.s
blobac50932c81b7906a432795c31455b6d812e2e27b
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, #-129
96 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
97 // CHECK-NEXT: cpy z0.b, p0/z, #-129
98 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
100 cpy z0.b, p0/z, #-1, lsl #8
101 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
102 // CHECK-NEXT: cpy z0.b, p0/z, #-1, lsl #8
103 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
105 cpy z0.b, p0/z, #256
106 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
107 // CHECK-NEXT: cpy z0.b, p0/z, #256
108 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
110 cpy z0.b, p0/z, #1, lsl #8
111 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
112 // CHECK-NEXT: cpy z0.b, p0/z, #1, lsl #8
113 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
115 cpy z0.h, p0/z, #-33024
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, #-33024
118 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
120 cpy z0.h, p0/z, #-32769
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, #-32769
123 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
125 cpy z0.h, p0/z, #-129, 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, #-129, lsl #8
128 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
130 cpy z0.h, p0/z, #32513
131 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 65280]
132 // CHECK-NEXT: cpy z0.h, p0/z, #32513
133 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
135 cpy z0.h, p0/z, #65281
136 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 65280]
137 // CHECK-NEXT: cpy z0.h, p0/z, #65281
138 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
140 cpy z0.h, p0/z, #256, 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, 65280]
142 // CHECK-NEXT: cpy z0.h, p0/z, #256, lsl #8
143 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
145 cpy z0.s, p0/z, #-33024
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, #-33024
148 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
150 cpy z0.s, p0/z, #-32769
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, #-32769
153 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
155 cpy z0.s, p0/z, #-129, 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, #-129, lsl #8
158 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
160 cpy z0.s, p0/z, #32513
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.s, p0/z, #32513
163 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
165 cpy z0.s, p0/z, #32768
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.s, p0/z, #32768
168 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
170 cpy z0.s, p0/z, #128, 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.s, p0/z, #128, lsl #8
173 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
175 cpy z0.d, p0/z, #-33024
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, #-33024
178 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
180 cpy z0.d, p0/z, #-32769
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, #-32769
183 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
185 cpy z0.d, p0/z, #-129, 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, #-129, lsl #8
188 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
190 cpy z0.d, p0/z, #32513
191 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
192 // CHECK-NEXT: cpy z0.d, p0/z, #32513
193 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
195 cpy z0.d, p0/z, #32768
196 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
197 // CHECK-NEXT: cpy z0.d, p0/z, #32768
198 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
200 cpy z0.d, p0/z, #128, lsl #8
201 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 127] or a multiple of 256 in range [-32768, 32512]
202 // CHECK-NEXT: cpy z0.d, p0/z, #128, lsl #8
203 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: