[AMDGPU] Add True16 register classes.
[llvm-project.git] / llvm / test / MC / AArch64 / SVE / add.s
blob5111c8bdb66e5f8e28aa04b6f332ee755a8174a3
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 add z31.s, z31.s, z31.s
13 // CHECK-INST: add z31.s, z31.s, z31.s
14 // CHECK-ENCODING: [0xff,0x03,0xbf,0x04]
15 // CHECK-ERROR: instruction requires: sve or sme
16 // CHECK-UNKNOWN: 04bf03ff <unknown>
18 add z23.d, z13.d, z8.d
19 // CHECK-INST: add z23.d, z13.d, z8.d
20 // CHECK-ENCODING: [0xb7,0x01,0xe8,0x04]
21 // CHECK-ERROR: instruction requires: sve or sme
22 // CHECK-UNKNOWN: 04e801b7 <unknown>
24 add z23.b, p3/m, z23.b, z13.b
25 // CHECK-INST: add z23.b, p3/m, z23.b, z13.b
26 // CHECK-ENCODING: [0xb7,0x0d,0x00,0x04]
27 // CHECK-ERROR: instruction requires: sve or sme
28 // CHECK-UNKNOWN: 04000db7 <unknown>
30 add z0.s, z0.s, z0.s
31 // CHECK-INST: add z0.s, z0.s, z0.s
32 // CHECK-ENCODING: [0x00,0x00,0xa0,0x04]
33 // CHECK-ERROR: instruction requires: sve or sme
34 // CHECK-UNKNOWN: 04a00000 <unknown>
36 add z31.d, z31.d, z31.d
37 // CHECK-INST: add z31.d, z31.d, z31.d
38 // CHECK-ENCODING: [0xff,0x03,0xff,0x04]
39 // CHECK-ERROR: instruction requires: sve or sme
40 // CHECK-UNKNOWN: 04ff03ff <unknown>
42 add z21.b, z10.b, z21.b
43 // CHECK-INST: add z21.b, z10.b, z21.b
44 // CHECK-ENCODING: [0x55,0x01,0x35,0x04]
45 // CHECK-ERROR: instruction requires: sve or sme
46 // CHECK-UNKNOWN: 04350155 <unknown>
48 add z31.b, z31.b, z31.b
49 // CHECK-INST: add z31.b, z31.b, z31.b
50 // CHECK-ENCODING: [0xff,0x03,0x3f,0x04]
51 // CHECK-ERROR: instruction requires: sve or sme
52 // CHECK-UNKNOWN: 043f03ff <unknown>
54 add z0.h, p0/m, z0.h, z0.h
55 // CHECK-INST: add z0.h, p0/m, z0.h, z0.h
56 // CHECK-ENCODING: [0x00,0x00,0x40,0x04]
57 // CHECK-ERROR: instruction requires: sve or sme
58 // CHECK-UNKNOWN: 04400000 <unknown>
60 add z0.h, z0.h, z0.h
61 // CHECK-INST: add z0.h, z0.h, z0.h
62 // CHECK-ENCODING: [0x00,0x00,0x60,0x04]
63 // CHECK-ERROR: instruction requires: sve or sme
64 // CHECK-UNKNOWN: 04600000 <unknown>
66 add z0.b, p0/m, z0.b, z0.b
67 // CHECK-INST: add z0.b, p0/m, z0.b, z0.b
68 // CHECK-ENCODING: [0x00,0x00,0x00,0x04]
69 // CHECK-ERROR: instruction requires: sve or sme
70 // CHECK-UNKNOWN: 04000000 <unknown>
72 add z0.s, p0/m, z0.s, z0.s
73 // CHECK-INST: add z0.s, p0/m, z0.s, z0.s
74 // CHECK-ENCODING: [0x00,0x00,0x80,0x04]
75 // CHECK-ERROR: instruction requires: sve or sme
76 // CHECK-UNKNOWN: 04800000 <unknown>
78 add z23.b, z13.b, z8.b
79 // CHECK-INST: add z23.b, z13.b, z8.b
80 // CHECK-ENCODING: [0xb7,0x01,0x28,0x04]
81 // CHECK-ERROR: instruction requires: sve or sme
82 // CHECK-UNKNOWN: 042801b7 <unknown>
84 add z0.d, z0.d, z0.d
85 // CHECK-INST: add z0.d, z0.d, z0.d
86 // CHECK-ENCODING: [0x00,0x00,0xe0,0x04]
87 // CHECK-ERROR: instruction requires: sve or sme
88 // CHECK-UNKNOWN: 04e00000 <unknown>
90 add z0.d, p0/m, z0.d, z0.d
91 // CHECK-INST: add z0.d, p0/m, z0.d, z0.d
92 // CHECK-ENCODING: [0x00,0x00,0xc0,0x04]
93 // CHECK-ERROR: instruction requires: sve or sme
94 // CHECK-UNKNOWN: 04c00000 <unknown>
96 add z31.h, z31.h, z31.h
97 // CHECK-INST: add z31.h, z31.h, z31.h
98 // CHECK-ENCODING: [0xff,0x03,0x7f,0x04]
99 // CHECK-ERROR: instruction requires: sve or sme
100 // CHECK-UNKNOWN: 047f03ff <unknown>
102 add z0.b, z0.b, z0.b
103 // CHECK-INST: add z0.b, z0.b, z0.b
104 // CHECK-ENCODING: [0x00,0x00,0x20,0x04]
105 // CHECK-ERROR: instruction requires: sve or sme
106 // CHECK-UNKNOWN: 04200000 <unknown>
108 add z21.d, z10.d, z21.d
109 // CHECK-INST: add z21.d, z10.d, z21.d
110 // CHECK-ENCODING: [0x55,0x01,0xf5,0x04]
111 // CHECK-ERROR: instruction requires: sve or sme
112 // CHECK-UNKNOWN: 04f50155 <unknown>
114 add z23.h, p3/m, z23.h, z13.h
115 // CHECK-INST: add z23.h, p3/m, z23.h, z13.h
116 // CHECK-ENCODING: [0xb7,0x0d,0x40,0x04]
117 // CHECK-ERROR: instruction requires: sve or sme
118 // CHECK-UNKNOWN: 04400db7 <unknown>
120 add z23.s, p3/m, z23.s, z13.s
121 // CHECK-INST: add z23.s, p3/m, z23.s, z13.s
122 // CHECK-ENCODING: [0xb7,0x0d,0x80,0x04]
123 // CHECK-ERROR: instruction requires: sve or sme
124 // CHECK-UNKNOWN: 04800db7 <unknown>
126 add z31.s, p7/m, z31.s, z31.s
127 // CHECK-INST: add z31.s, p7/m, z31.s, z31.s
128 // CHECK-ENCODING: [0xff,0x1f,0x80,0x04]
129 // CHECK-ERROR: instruction requires: sve or sme
130 // CHECK-UNKNOWN: 04801fff <unknown>
132 add z21.h, z10.h, z21.h
133 // CHECK-INST: add z21.h, z10.h, z21.h
134 // CHECK-ENCODING: [0x55,0x01,0x75,0x04]
135 // CHECK-ERROR: instruction requires: sve or sme
136 // CHECK-UNKNOWN: 04750155 <unknown>
138 add z23.d, p3/m, z23.d, z13.d
139 // CHECK-INST: add z23.d, p3/m, z23.d, z13.d
140 // CHECK-ENCODING: [0xb7,0x0d,0xc0,0x04]
141 // CHECK-ERROR: instruction requires: sve or sme
142 // CHECK-UNKNOWN: 04c00db7 <unknown>
144 add z21.d, p5/m, z21.d, z10.d
145 // CHECK-INST: add z21.d, p5/m, z21.d, z10.d
146 // CHECK-ENCODING: [0x55,0x15,0xc0,0x04]
147 // CHECK-ERROR: instruction requires: sve or sme
148 // CHECK-UNKNOWN: 04c01555 <unknown>
150 add z21.b, p5/m, z21.b, z10.b
151 // CHECK-INST: add z21.b, p5/m, z21.b, z10.b
152 // CHECK-ENCODING: [0x55,0x15,0x00,0x04]
153 // CHECK-ERROR: instruction requires: sve or sme
154 // CHECK-UNKNOWN: 04001555 <unknown>
156 add z21.s, z10.s, z21.s
157 // CHECK-INST: add z21.s, z10.s, z21.s
158 // CHECK-ENCODING: [0x55,0x01,0xb5,0x04]
159 // CHECK-ERROR: instruction requires: sve or sme
160 // CHECK-UNKNOWN: 04b50155 <unknown>
162 add z21.h, p5/m, z21.h, z10.h
163 // CHECK-INST: add z21.h, p5/m, z21.h, z10.h
164 // CHECK-ENCODING: [0x55,0x15,0x40,0x04]
165 // CHECK-ERROR: instruction requires: sve or sme
166 // CHECK-UNKNOWN: 04401555 <unknown>
168 add z31.h, p7/m, z31.h, z31.h
169 // CHECK-INST: add z31.h, p7/m, z31.h, z31.h
170 // CHECK-ENCODING: [0xff,0x1f,0x40,0x04]
171 // CHECK-ERROR: instruction requires: sve or sme
172 // CHECK-UNKNOWN: 04401fff <unknown>
174 add z23.h, z13.h, z8.h
175 // CHECK-INST: add z23.h, z13.h, z8.h
176 // CHECK-ENCODING: [0xb7,0x01,0x68,0x04]
177 // CHECK-ERROR: instruction requires: sve or sme
178 // CHECK-UNKNOWN: 046801b7 <unknown>
180 add z31.d, p7/m, z31.d, z31.d
181 // CHECK-INST: add z31.d, p7/m, z31.d, z31.d
182 // CHECK-ENCODING: [0xff,0x1f,0xc0,0x04]
183 // CHECK-ERROR: instruction requires: sve or sme
184 // CHECK-UNKNOWN: 04c01fff <unknown>
186 add z21.s, p5/m, z21.s, z10.s
187 // CHECK-INST: add z21.s, p5/m, z21.s, z10.s
188 // CHECK-ENCODING: [0x55,0x15,0x80,0x04]
189 // CHECK-ERROR: instruction requires: sve or sme
190 // CHECK-UNKNOWN: 04801555 <unknown>
192 add z31.b, p7/m, z31.b, z31.b
193 // CHECK-INST: add z31.b, p7/m, z31.b, z31.b
194 // CHECK-ENCODING: [0xff,0x1f,0x00,0x04]
195 // CHECK-ERROR: instruction requires: sve or sme
196 // CHECK-UNKNOWN: 04001fff <unknown>
198 add z23.s, z13.s, z8.s
199 // CHECK-INST: add z23.s, z13.s, z8.s
200 // CHECK-ENCODING: [0xb7,0x01,0xa8,0x04]
201 // CHECK-ERROR: instruction requires: sve or sme
202 // CHECK-UNKNOWN: 04a801b7 <unknown>
204 add z0.b, z0.b, #0
205 // CHECK-INST: add z0.b, z0.b, #0
206 // CHECK-ENCODING: [0x00,0xc0,0x20,0x25]
207 // CHECK-ERROR: instruction requires: sve or sme
208 // CHECK-UNKNOWN: 2520c000 <unknown>
210 add z31.b, z31.b, #255
211 // CHECK-INST: add z31.b, z31.b, #255
212 // CHECK-ENCODING: [0xff,0xdf,0x20,0x25]
213 // CHECK-ERROR: instruction requires: sve or sme
214 // CHECK-UNKNOWN: 2520dfff <unknown>
216 add z0.h, z0.h, #0
217 // CHECK-INST: add z0.h, z0.h, #0
218 // CHECK-ENCODING: [0x00,0xc0,0x60,0x25]
219 // CHECK-ERROR: instruction requires: sve or sme
220 // CHECK-UNKNOWN: 2560c000 <unknown>
222 add z0.h, z0.h, #0, lsl #8
223 // CHECK-INST: add z0.h, z0.h, #0, lsl #8
224 // CHECK-ENCODING: [0x00,0xe0,0x60,0x25]
225 // CHECK-ERROR: instruction requires: sve or sme
226 // CHECK-UNKNOWN: 2560e000 <unknown>
228 add z31.h, z31.h, #255, lsl #8
229 // CHECK-INST: add z31.h, z31.h, #65280
230 // CHECK-ENCODING: [0xff,0xff,0x60,0x25]
231 // CHECK-ERROR: instruction requires: sve or sme
232 // CHECK-UNKNOWN: 2560ffff <unknown>
234 add z31.h, z31.h, #65280
235 // CHECK-INST: add z31.h, z31.h, #65280
236 // CHECK-ENCODING: [0xff,0xff,0x60,0x25]
237 // CHECK-ERROR: instruction requires: sve or sme
238 // CHECK-UNKNOWN: 2560ffff <unknown>
240 add z0.s, z0.s, #0
241 // CHECK-INST: add z0.s, z0.s, #0
242 // CHECK-ENCODING: [0x00,0xc0,0xa0,0x25]
243 // CHECK-ERROR: instruction requires: sve or sme
244 // CHECK-UNKNOWN: 25a0c000 <unknown>
246 add z0.s, z0.s, #0, lsl #8
247 // CHECK-INST: add z0.s, z0.s, #0, lsl #8
248 // CHECK-ENCODING: [0x00,0xe0,0xa0,0x25]
249 // CHECK-ERROR: instruction requires: sve or sme
250 // CHECK-UNKNOWN: 25a0e000 <unknown>
252 add z31.s, z31.s, #255, lsl #8
253 // CHECK-INST: add z31.s, z31.s, #65280
254 // CHECK-ENCODING: [0xff,0xff,0xa0,0x25]
255 // CHECK-ERROR: instruction requires: sve or sme
256 // CHECK-UNKNOWN: 25a0ffff <unknown>
258 add z31.s, z31.s, #65280
259 // CHECK-INST: add z31.s, z31.s, #65280
260 // CHECK-ENCODING: [0xff,0xff,0xa0,0x25]
261 // CHECK-ERROR: instruction requires: sve or sme
262 // CHECK-UNKNOWN: 25a0ffff <unknown>
264 add z0.d, z0.d, #0
265 // CHECK-INST: add z0.d, z0.d, #0
266 // CHECK-ENCODING: [0x00,0xc0,0xe0,0x25]
267 // CHECK-ERROR: instruction requires: sve or sme
268 // CHECK-UNKNOWN: 25e0c000 <unknown>
270 add z0.d, z0.d, #0, lsl #8
271 // CHECK-INST: add z0.d, z0.d, #0, lsl #8
272 // CHECK-ENCODING: [0x00,0xe0,0xe0,0x25]
273 // CHECK-ERROR: instruction requires: sve or sme
274 // CHECK-UNKNOWN: 25e0e000 <unknown>
276 add z31.d, z31.d, #255, lsl #8
277 // CHECK-INST: add z31.d, z31.d, #65280
278 // CHECK-ENCODING: [0xff,0xff,0xe0,0x25]
279 // CHECK-ERROR: instruction requires: sve or sme
280 // CHECK-UNKNOWN: 25e0ffff <unknown>
282 add z31.d, z31.d, #65280
283 // CHECK-INST: add z31.d, z31.d, #65280
284 // CHECK-ENCODING: [0xff,0xff,0xe0,0x25]
285 // CHECK-ERROR: instruction requires: sve or sme
286 // CHECK-UNKNOWN: 25e0ffff <unknown>
290 // --------------------------------------------------------------------------//
291 // Test compatibility with MOVPRFX instruction.
293 movprfx z4.b, p7/z, z6.b
294 // CHECK-INST: movprfx z4.b, p7/z, z6.b
295 // CHECK-ENCODING: [0xc4,0x3c,0x10,0x04]
296 // CHECK-ERROR: instruction requires: sve or sme
297 // CHECK-UNKNOWN: 04103cc4 <unknown>
299 add z4.b, p7/m, z4.b, z31.b
300 // CHECK-INST: add z4.b, p7/m, z4.b, z31.b
301 // CHECK-ENCODING: [0xe4,0x1f,0x00,0x04]
302 // CHECK-ERROR: instruction requires: sve or sme
303 // CHECK-UNKNOWN: 04001fe4 <unknown>
305 movprfx z4, z6
306 // CHECK-INST: movprfx z4, z6
307 // CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]
308 // CHECK-ERROR: instruction requires: sve or sme
309 // CHECK-UNKNOWN: 0420bcc4 <unknown>
311 add z4.b, p7/m, z4.b, z31.b
312 // CHECK-INST: add z4.b, p7/m, z4.b, z31.b
313 // CHECK-ENCODING: [0xe4,0x1f,0x00,0x04]
314 // CHECK-ERROR: instruction requires: sve or sme
315 // CHECK-UNKNOWN: 04001fe4 <unknown>
317 movprfx z31, z6
318 // CHECK-INST: movprfx z31, z6
319 // CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
320 // CHECK-ERROR: instruction requires: sve or sme
321 // CHECK-UNKNOWN: 0420bcdf <unknown>
323 add z31.d, z31.d, #65280
324 // CHECK-INST: add z31.d, z31.d, #65280
325 // CHECK-ENCODING: [0xff,0xff,0xe0,0x25]
326 // CHECK-ERROR: instruction requires: sve or sme
327 // CHECK-UNKNOWN: 25e0ffff <unknown>