Revert "CodeGen][NewPM] Port MachineScheduler to NPM. (#125703)" (#126268)
[llvm-project.git] / llvm / test / MC / AArch64 / SVE / cpy.s
blob9593ff674db45a9e6db924a41a946c456aea79c7
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
4 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
9 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
10 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN
12 cpy z0.b, p0/m, w0
13 // CHECK-INST: mov z0.b, p0/m, w0
14 // CHECK-ENCODING: [0x00,0xa0,0x28,0x05]
15 // CHECK-ERROR: instruction requires: sve or sme
16 // CHECK-UNKNOWN: 0528a000 <unknown>
18 cpy z0.h, p0/m, w0
19 // CHECK-INST: mov z0.h, p0/m, w0
20 // CHECK-ENCODING: [0x00,0xa0,0x68,0x05]
21 // CHECK-ERROR: instruction requires: sve or sme
22 // CHECK-UNKNOWN: 0568a000 <unknown>
24 cpy z0.s, p0/m, w0
25 // CHECK-INST: mov z0.s, p0/m, w0
26 // CHECK-ENCODING: [0x00,0xa0,0xa8,0x05]
27 // CHECK-ERROR: instruction requires: sve or sme
28 // CHECK-UNKNOWN: 05a8a000 <unknown>
30 cpy z0.d, p0/m, x0
31 // CHECK-INST: mov z0.d, p0/m, x0
32 // CHECK-ENCODING: [0x00,0xa0,0xe8,0x05]
33 // CHECK-ERROR: instruction requires: sve or sme
34 // CHECK-UNKNOWN: 05e8a000 <unknown>
36 cpy z31.b, p7/m, wsp
37 // CHECK-INST: mov z31.b, p7/m, wsp
38 // CHECK-ENCODING: [0xff,0xbf,0x28,0x05]
39 // CHECK-ERROR: instruction requires: sve or sme
40 // CHECK-UNKNOWN: 0528bfff <unknown>
42 cpy z31.h, p7/m, wsp
43 // CHECK-INST: mov z31.h, p7/m, wsp
44 // CHECK-ENCODING: [0xff,0xbf,0x68,0x05]
45 // CHECK-ERROR: instruction requires: sve or sme
46 // CHECK-UNKNOWN: 0568bfff <unknown>
48 cpy z31.s, p7/m, wsp
49 // CHECK-INST: mov z31.s, p7/m, wsp
50 // CHECK-ENCODING: [0xff,0xbf,0xa8,0x05]
51 // CHECK-ERROR: instruction requires: sve or sme
52 // CHECK-UNKNOWN: 05a8bfff <unknown>
54 cpy z31.d, p7/m, sp
55 // CHECK-INST: mov z31.d, p7/m, sp
56 // CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]
57 // CHECK-ERROR: instruction requires: sve or sme
58 // CHECK-UNKNOWN: 05e8bfff <unknown>
60 cpy z0.b, p0/m, b0
61 // CHECK-INST: mov z0.b, p0/m, b0
62 // CHECK-ENCODING: [0x00,0x80,0x20,0x05]
63 // CHECK-ERROR: instruction requires: sve or sme
64 // CHECK-UNKNOWN: 05208000 <unknown>
66 cpy z31.b, p7/m, b31
67 // CHECK-INST: mov z31.b, p7/m, b31
68 // CHECK-ENCODING: [0xff,0x9f,0x20,0x05]
69 // CHECK-ERROR: instruction requires: sve or sme
70 // CHECK-UNKNOWN: 05209fff <unknown>
72 cpy z0.h, p0/m, h0
73 // CHECK-INST: mov z0.h, p0/m, h0
74 // CHECK-ENCODING: [0x00,0x80,0x60,0x05]
75 // CHECK-ERROR: instruction requires: sve or sme
76 // CHECK-UNKNOWN: 05608000 <unknown>
78 cpy z31.h, p7/m, h31
79 // CHECK-INST: mov z31.h, p7/m, h31
80 // CHECK-ENCODING: [0xff,0x9f,0x60,0x05]
81 // CHECK-ERROR: instruction requires: sve or sme
82 // CHECK-UNKNOWN: 05609fff <unknown>
84 cpy z0.s, p0/m, s0
85 // CHECK-INST: mov z0.s, p0/m, s0
86 // CHECK-ENCODING: [0x00,0x80,0xa0,0x05]
87 // CHECK-ERROR: instruction requires: sve or sme
88 // CHECK-UNKNOWN: 05a08000 <unknown>
90 cpy z31.s, p7/m, s31
91 // CHECK-INST: mov z31.s, p7/m, s31
92 // CHECK-ENCODING: [0xff,0x9f,0xa0,0x05]
93 // CHECK-ERROR: instruction requires: sve or sme
94 // CHECK-UNKNOWN: 05a09fff <unknown>
96 cpy z0.d, p0/m, d0
97 // CHECK-INST: mov z0.d, p0/m, d0
98 // CHECK-ENCODING: [0x00,0x80,0xe0,0x05]
99 // CHECK-ERROR: instruction requires: sve or sme
100 // CHECK-UNKNOWN: 05e08000 <unknown>
102 cpy z31.d, p7/m, d31
103 // CHECK-INST: mov z31.d, p7/m, d31
104 // CHECK-ENCODING: [0xff,0x9f,0xe0,0x05]
105 // CHECK-ERROR: instruction requires: sve or sme
106 // CHECK-UNKNOWN: 05e09fff <unknown>
108 cpy z5.b, p0/z, #-128
109 // CHECK-INST: mov z5.b, p0/z, #-128
110 // CHECK-ENCODING: [0x05,0x10,0x10,0x05]
111 // CHECK-ERROR: instruction requires: sve or sme
112 // CHECK-UNKNOWN: 05101005 <unknown>
114 cpy z5.b, p0/z, #127
115 // CHECK-INST: mov z5.b, p0/z, #127
116 // CHECK-ENCODING: [0xe5,0x0f,0x10,0x05]
117 // CHECK-ERROR: instruction requires: sve or sme
118 // CHECK-UNKNOWN: 05100fe5 <unknown>
120 cpy z5.b, p0/z, #255
121 // CHECK-INST: mov z5.b, p0/z, #-1
122 // CHECK-ENCODING: [0xe5,0x1f,0x10,0x05]
123 // CHECK-ERROR: instruction requires: sve or sme
124 // CHECK-UNKNOWN: 05101fe5 <unknown>
126 cpy z21.h, p0/z, #-128
127 // CHECK-INST: mov z21.h, p0/z, #-128
128 // CHECK-ENCODING: [0x15,0x10,0x50,0x05]
129 // CHECK-ERROR: instruction requires: sve or sme
130 // CHECK-UNKNOWN: 05501015 <unknown>
132 cpy z21.h, p0/z, #-128, lsl #8
133 // CHECK-INST: mov z21.h, p0/z, #-32768
134 // CHECK-ENCODING: [0x15,0x30,0x50,0x05]
135 // CHECK-ERROR: instruction requires: sve or sme
136 // CHECK-UNKNOWN: 05503015 <unknown>
138 cpy z21.h, p0/z, #-32768
139 // CHECK-INST: mov z21.h, p0/z, #-32768
140 // CHECK-ENCODING: [0x15,0x30,0x50,0x05]
141 // CHECK-ERROR: instruction requires: sve or sme
142 // CHECK-UNKNOWN: 05503015 <unknown>
144 cpy z21.h, p0/z, #127
145 // CHECK-INST: mov z21.h, p0/z, #127
146 // CHECK-ENCODING: [0xf5,0x0f,0x50,0x05]
147 // CHECK-ERROR: instruction requires: sve or sme
148 // CHECK-UNKNOWN: 05500ff5 <unknown>
150 cpy z21.h, p0/z, #127, lsl #8
151 // CHECK-INST: mov z21.h, p0/z, #32512
152 // CHECK-ENCODING: [0xf5,0x2f,0x50,0x05]
153 // CHECK-ERROR: instruction requires: sve or sme
154 // CHECK-UNKNOWN: 05502ff5 <unknown>
156 cpy z21.h, p0/z, #32512
157 // CHECK-INST: mov z21.h, p0/z, #32512
158 // CHECK-ENCODING: [0xf5,0x2f,0x50,0x05]
159 // CHECK-ERROR: instruction requires: sve or sme
160 // CHECK-UNKNOWN: 05502ff5 <unknown>
162 cpy z21.s, p0/z, #-128
163 // CHECK-INST: mov z21.s, p0/z, #-128
164 // CHECK-ENCODING: [0x15,0x10,0x90,0x05]
165 // CHECK-ERROR: instruction requires: sve or sme
166 // CHECK-UNKNOWN: 05901015 <unknown>
168 cpy z21.s, p0/z, #-128, lsl #8
169 // CHECK-INST: mov z21.s, p0/z, #-32768
170 // CHECK-ENCODING: [0x15,0x30,0x90,0x05]
171 // CHECK-ERROR: instruction requires: sve or sme
172 // CHECK-UNKNOWN: 05903015 <unknown>
174 cpy z21.s, p0/z, #-32768
175 // CHECK-INST: mov z21.s, p0/z, #-32768
176 // CHECK-ENCODING: [0x15,0x30,0x90,0x05]
177 // CHECK-ERROR: instruction requires: sve or sme
178 // CHECK-UNKNOWN: 05903015 <unknown>
180 cpy z21.s, p0/z, #127
181 // CHECK-INST: mov z21.s, p0/z, #127
182 // CHECK-ENCODING: [0xf5,0x0f,0x90,0x05]
183 // CHECK-ERROR: instruction requires: sve or sme
184 // CHECK-UNKNOWN: 05900ff5 <unknown>
186 cpy z21.s, p0/z, #127, lsl #8
187 // CHECK-INST: mov z21.s, p0/z, #32512
188 // CHECK-ENCODING: [0xf5,0x2f,0x90,0x05]
189 // CHECK-ERROR: instruction requires: sve or sme
190 // CHECK-UNKNOWN: 05902ff5 <unknown>
192 cpy z21.s, p0/z, #32512
193 // CHECK-INST: mov z21.s, p0/z, #32512
194 // CHECK-ENCODING: [0xf5,0x2f,0x90,0x05]
195 // CHECK-ERROR: instruction requires: sve or sme
196 // CHECK-UNKNOWN: 05902ff5 <unknown>
198 cpy z21.d, p0/z, #-128
199 // CHECK-INST: mov z21.d, p0/z, #-128
200 // CHECK-ENCODING: [0x15,0x10,0xd0,0x05]
201 // CHECK-ERROR: instruction requires: sve or sme
202 // CHECK-UNKNOWN: 05d01015 <unknown>
204 cpy z21.d, p0/z, #-128, lsl #8
205 // CHECK-INST: mov z21.d, p0/z, #-32768
206 // CHECK-ENCODING: [0x15,0x30,0xd0,0x05]
207 // CHECK-ERROR: instruction requires: sve or sme
208 // CHECK-UNKNOWN: 05d03015 <unknown>
210 cpy z21.d, p0/z, #-32768
211 // CHECK-INST: mov z21.d, p0/z, #-32768
212 // CHECK-ENCODING: [0x15,0x30,0xd0,0x05]
213 // CHECK-ERROR: instruction requires: sve or sme
214 // CHECK-UNKNOWN: 05d03015 <unknown>
216 cpy z21.d, p0/z, #127
217 // CHECK-INST: mov z21.d, p0/z, #127
218 // CHECK-ENCODING: [0xf5,0x0f,0xd0,0x05]
219 // CHECK-ERROR: instruction requires: sve or sme
220 // CHECK-UNKNOWN: 05d00ff5 <unknown>
222 cpy z21.d, p0/z, #127, lsl #8
223 // CHECK-INST: mov z21.d, p0/z, #32512
224 // CHECK-ENCODING: [0xf5,0x2f,0xd0,0x05]
225 // CHECK-ERROR: instruction requires: sve or sme
226 // CHECK-UNKNOWN: 05d02ff5 <unknown>
228 cpy z21.d, p0/z, #32512
229 // CHECK-INST: mov z21.d, p0/z, #32512
230 // CHECK-ENCODING: [0xf5,0x2f,0xd0,0x05]
231 // CHECK-ERROR: instruction requires: sve or sme
232 // CHECK-UNKNOWN: 05d02ff5 <unknown>
234 // --------------------------------------------------------------------------//
235 // Tests where the negative immediate is in bounds when interpreted
236 // as the element type.
238 cpy z0.b, p0/z, #-129
239 // CHECK-INST: mov z0.b, p0/z, #127
240 // CHECK-ENCODING: [0xe0,0x0f,0x10,0x05]
241 // CHECK-ERROR: instruction requires: sve or sme
242 // CHECK-UNKNOWN: 05100fe0 <unknown>
244 cpy z0.h, p0/z, #-33024
245 // CHECK-INST: mov z0.h, p0/z, #32512
246 // CHECK-ENCODING: [0xe0,0x2f,0x50,0x05]
247 // CHECK-ERROR: instruction requires: sve or sme
248 // CHECK-UNKNOWN: 05502fe0 <unknown>
250 cpy z0.h, p0/z, #-129, lsl #8
251 // CHECK-INST: mov z0.h, p0/z, #32512
252 // CHECK-ENCODING: [0xe0,0x2f,0x50,0x05]
253 // CHECK-ERROR: instruction requires: sve or sme
254 // CHECK-UNKNOWN: 05502fe0 <unknown>
257 // --------------------------------------------------------------------------//
258 // Tests for merging variant (/m) and testing the range of predicate (> 7)
259 // is allowed.
261 cpy z5.b, p15/m, #-128
262 // CHECK-INST: mov z5.b, p15/m, #-128
263 // CHECK-ENCODING: [0x05,0x50,0x1f,0x05]
264 // CHECK-ERROR: instruction requires: sve or sme
265 // CHECK-UNKNOWN: 051f5005 <unknown>
267 cpy z21.h, p15/m, #-128
268 // CHECK-INST: mov z21.h, p15/m, #-128
269 // CHECK-ENCODING: [0x15,0x50,0x5f,0x05]
270 // CHECK-ERROR: instruction requires: sve or sme
271 // CHECK-UNKNOWN: 055f5015 <unknown>
273 cpy z21.h, p15/m, #-128, lsl #8
274 // CHECK-INST: mov z21.h, p15/m, #-32768
275 // CHECK-ENCODING: [0x15,0x70,0x5f,0x05]
276 // CHECK-ERROR: instruction requires: sve or sme
277 // CHECK-UNKNOWN: 055f7015 <unknown>
279 cpy z21.s, p15/m, #-128
280 // CHECK-INST: mov z21.s, p15/m, #-128
281 // CHECK-ENCODING: [0x15,0x50,0x9f,0x05]
282 // CHECK-ERROR: instruction requires: sve or sme
283 // CHECK-UNKNOWN: 059f5015 <unknown>
285 cpy z21.s, p15/m, #-128, lsl #8
286 // CHECK-INST: mov z21.s, p15/m, #-32768
287 // CHECK-ENCODING: [0x15,0x70,0x9f,0x05]
288 // CHECK-ERROR: instruction requires: sve or sme
289 // CHECK-UNKNOWN: 059f7015 <unknown>
291 cpy z21.d, p15/m, #-128
292 // CHECK-INST: mov z21.d, p15/m, #-128
293 // CHECK-ENCODING: [0x15,0x50,0xdf,0x05]
294 // CHECK-ERROR: instruction requires: sve or sme
295 // CHECK-UNKNOWN: 05df5015 <unknown>
297 cpy z21.d, p15/m, #-128, lsl #8
298 // CHECK-INST: mov z21.d, p15/m, #-32768
299 // CHECK-ENCODING: [0x15,0x70,0xdf,0x05]
300 // CHECK-ERROR: instruction requires: sve or sme
301 // CHECK-UNKNOWN: 05df7015 <unknown>
304 // --------------------------------------------------------------------------//
305 // Test compatibility with MOVPRFX instruction.
307 movprfx z31.d, p7/z, z6.d
308 // CHECK-INST: movprfx z31.d, p7/z, z6.d
309 // CHECK-ENCODING: [0xdf,0x3c,0xd0,0x04]
310 // CHECK-ERROR: instruction requires: sve or sme
311 // CHECK-UNKNOWN: 04d03cdf <unknown>
313 cpy z31.d, p7/m, sp
314 // CHECK-INST: mov z31.d, p7/m, sp
315 // CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]
316 // CHECK-ERROR: instruction requires: sve or sme
317 // CHECK-UNKNOWN: 05e8bfff <unknown>
319 movprfx z31, z6
320 // CHECK-INST: movprfx z31, z6
321 // CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
322 // CHECK-ERROR: instruction requires: sve or sme
323 // CHECK-UNKNOWN: 0420bcdf <unknown>
325 cpy z31.d, p7/m, sp
326 // CHECK-INST: mov z31.d, p7/m, sp
327 // CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]
328 // CHECK-ERROR: instruction requires: sve or sme
329 // CHECK-UNKNOWN: 05e8bfff <unknown>
331 movprfx z21.d, p7/z, z28.d
332 // CHECK-INST: movprfx z21.d, p7/z, z28.d
333 // CHECK-ENCODING: [0x95,0x3f,0xd0,0x04]
334 // CHECK-ERROR: instruction requires: sve or sme
335 // CHECK-UNKNOWN: 04d03f95 <unknown>
337 cpy z21.d, p7/m, #-128, lsl #8
338 // CHECK-INST: mov z21.d, p7/m, #-32768
339 // CHECK-ENCODING: [0x15,0x70,0xd7,0x05]
340 // CHECK-ERROR: instruction requires: sve or sme
341 // CHECK-UNKNOWN: 05d77015 <unknown>
343 movprfx z21, z28
344 // CHECK-INST: movprfx z21, z28
345 // CHECK-ENCODING: [0x95,0xbf,0x20,0x04]
346 // CHECK-ERROR: instruction requires: sve or sme
347 // CHECK-UNKNOWN: 0420bf95 <unknown>
349 cpy z21.d, p15/m, #-128, lsl #8
350 // CHECK-INST: mov z21.d, p15/m, #-32768
351 // CHECK-ENCODING: [0x15,0x70,0xdf,0x05]
352 // CHECK-ERROR: instruction requires: sve or sme
353 // CHECK-UNKNOWN: 05df7015 <unknown>
355 movprfx z4.d, p7/z, z6.d
356 // CHECK-INST: movprfx z4.d, p7/z, z6.d
357 // CHECK-ENCODING: [0xc4,0x3c,0xd0,0x04]
358 // CHECK-ERROR: instruction requires: sve or sme
359 // CHECK-UNKNOWN: 04d03cc4 <unknown>
361 cpy z4.d, p7/m, d31
362 // CHECK-INST: mov z4.d, p7/m, d31
363 // CHECK-ENCODING: [0xe4,0x9f,0xe0,0x05]
364 // CHECK-ERROR: instruction requires: sve or sme
365 // CHECK-UNKNOWN: 05e09fe4 <unknown>
367 movprfx z4, z6
368 // CHECK-INST: movprfx z4, z6
369 // CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]
370 // CHECK-ERROR: instruction requires: sve or sme
371 // CHECK-UNKNOWN: 0420bcc4 <unknown>
373 cpy z4.d, p7/m, d31
374 // CHECK-INST: mov z4.d, p7/m, d31
375 // CHECK-ENCODING: [0xe4,0x9f,0xe0,0x05]
376 // CHECK-ERROR: instruction requires: sve or sme
377 // CHECK-UNKNOWN: 05e09fe4 <unknown>