Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AMDGPU / gfx10_asm_err.s
blobef12ba2a66b19401cc7e08779c856e9e9ee7cedf
1 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx601 %s 2>&1 | FileCheck --check-prefixes=GFX6-7,GFX6-8,GFX6-9 --implicit-check-not=error: %s
2 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx701 %s 2>&1 | FileCheck --check-prefixes=GFX6-7,GFX6-8,GFX6-9 --implicit-check-not=error: %s
3 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx801 %s 2>&1 | FileCheck --check-prefixes=GFX6-8,GFX6-9,GFX8-9 --implicit-check-not=error: %s
4 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck --check-prefixes=GFX6-9,GFX8-9 --implicit-check-not=error: %s
5 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32,-wavefrontsize64 %s 2>&1 | FileCheck --check-prefixes=GFX10 --implicit-check-not=error: %s
6 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1010 -mattr=-wavefrontsize32,+wavefrontsize64 %s 2>&1 | FileCheck --check-prefixes=GFX10 --implicit-check-not=error: %s
8 //===----------------------------------------------------------------------===//
9 // ENC_DS.
10 //===----------------------------------------------------------------------===//
12 // GFX9+.
14 ds_write_b8_d16_hi v1, v2
15 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
17 ds_write_b16_d16_hi v1, v2
18 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
20 ds_read_u8_d16 v5, v1
21 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
23 ds_read_u8_d16_hi v5, v1
24 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
26 ds_read_i8_d16 v5, v1
27 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
29 ds_read_i8_d16_hi v5, v1
30 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
32 ds_read_u16_d16 v5, v1
33 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
35 ds_read_u16_d16_hi v5, v1
36 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
38 ds_write_addtid_b32 v5
39 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
41 ds_read_addtid_b32 v5
42 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
44 // GFX8+.
46 ds_add_src2_f32 v1
47 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
49 ds_add_f32 v0, v1
50 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
52 ds_add_rtn_f32 v0, v1, v2
53 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
55 ds_permute_b32 v0, v1, v2
56 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
58 ds_bpermute_b32 v0, v1, v2
59 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
61 //===----------------------------------------------------------------------===//
62 // ENC_SOP1.
63 //===----------------------------------------------------------------------===//
65 // GFX10+.
67 s_and_saveexec_b32 s0, s1
68 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
70 s_or_saveexec_b32 s0, s1
71 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
73 s_xor_saveexec_b32 s0, s1
74 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
76 s_andn2_saveexec_b32 s0, s1
77 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
79 s_orn2_saveexec_b32 s0, s1
80 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
82 s_nand_saveexec_b32 s0, s1
83 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
85 s_nor_saveexec_b32 s0, s1
86 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
88 s_xnor_saveexec_b32 s0, s1
89 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
91 s_andn1_saveexec_b32 s0, s1
92 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
94 s_orn1_saveexec_b32 s0, s1
95 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
97 s_andn1_wrexec_b32 s0, s1
98 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
100 s_andn2_wrexec_b32 s0, s1
101 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
103 s_movrelsd_2_b32 s0, s1
104 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
106 // GFX9+.
108 s_andn1_saveexec_b64 s[0:1], s[2:3]
109 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
111 s_orn1_saveexec_b64 s[0:1], s[2:3]
112 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
114 s_andn1_wrexec_b64 s[0:1], s[2:3]
115 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
117 s_andn2_wrexec_b64 s[0:1], s[2:3]
118 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
120 s_bitreplicate_b64_b32 s[0:1], s2
121 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
123 // GFX8, GFX9.
125 s_set_gpr_idx_idx s0
126 // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
127 // GFX6-7: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU
129 // GFX6, GFX7, GFX8, GFX9.
131 s_cbranch_join s0
132 // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
134 //===----------------------------------------------------------------------===//
135 // ENC_SOP2.
136 //===----------------------------------------------------------------------===//
138 // GFX9+.
140 s_lshl1_add_u32 s0, s1, s2
141 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
143 s_lshl2_add_u32 s0, s1, s2
144 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
146 s_lshl3_add_u32 s0, s1, s2
147 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
149 s_lshl4_add_u32 s0, s1, s2
150 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
152 s_mul_hi_u32 s0, s1, s2
153 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
155 s_mul_hi_i32 s0, s1, s2
156 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
158 s_pack_ll_b32_b16 s0, s1, s2
159 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
161 s_pack_lh_b32_b16 s0, s1, s2
162 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
164 s_pack_hh_b32_b16 s0, s1, s2
165 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
167 // GFX8, GFX9.
169 s_rfe_restore_b64 s[0:1], s2
170 // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
171 // GFX6-7: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU
173 // GFX6, GFX7, GFX8, GFX9.
175 s_cbranch_g_fork s[0:1], s[2:3]
176 // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
178 //===----------------------------------------------------------------------===//
179 // ENC_SOPC.
180 //===----------------------------------------------------------------------===//
182 // GFX8+.
184 s_cmp_eq_u64 s[0:1], s[2:3]
185 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
187 s_cmp_lg_u64 s[0:1], s[2:3]
188 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
190 // GFX6, GFX7, GFX8, GFX9.
192 s_setvskip s0, s1
193 // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
195 //===----------------------------------------------------------------------===//
196 // ENC_SOPK.
197 //===----------------------------------------------------------------------===//
199 // GFX10+.
201 s_version 0x1234
202 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
204 s_waitcnt_vscnt s0, 0x1234
205 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
207 s_waitcnt_vmcnt s0, 0x1234
208 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
210 s_waitcnt_expcnt s0, 0x1234
211 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
213 s_waitcnt_lgkmcnt s0, 0x1234
214 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
216 s_subvector_loop_begin s0, 0x1234
217 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
219 s_subvector_loop_end s0, 0x1234
220 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
222 // GFX9+.
224 s_call_b64 s[0:1], 0x1234
225 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
227 // GFX6, GFX7, GFX8, GFX9.
229 s_cbranch_i_fork s[0:1], 0x1234
230 // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
232 //===----------------------------------------------------------------------===//
233 // ENC_SOPP.
234 //===----------------------------------------------------------------------===//
236 // GFX10+.
238 s_code_end
239 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
241 s_inst_prefetch 0x0
242 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
244 s_clause 0x0
245 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
247 s_round_mode 0x0
248 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
250 s_denorm_mode 0x0
251 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
253 s_ttracedata_imm 0x0
254 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
256 // GFX9+.
258 s_endpgm_ordered_ps_done
259 // GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
261 // GFX8+.
263 s_wakeup
264 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
266 s_endpgm_saved
267 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
269 //===----------------------------------------------------------------------===//
270 // DPP8.
271 //===----------------------------------------------------------------------===//
273 v_mov_b32_dpp v5, v1 dpp8:[0,1,2,3,4,5,6,7]
274 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: dpp variant of this instruction is not supported
275 // GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: not a valid operand
277 //===----------------------------------------------------------------------===//
278 // VOP2
279 //===----------------------------------------------------------------------===//
281 v_fmaak_f32 v0, 0xff32ff, v0, 0x11213141
282 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
283 // GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed
285 v_fmamk_f32 v0, 0xff32ff, 0x11213141, v0
286 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
287 // GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed
289 v_fmaak_f32 v0, 0xff32, v0, 0x1122
290 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
291 // GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed
293 v_fmamk_f32 v0, 0xff32, 0x1122, v0
294 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
295 // GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed
297 v_fmaak_f32 v0, 0xff32, v0, 0
298 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
299 // GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed
301 v_fmaak_f16 v0, 0xff32, v0, 0
302 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
303 // GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed
305 v_fmamk_f32 v0, 0xff32, 1, v0
306 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
307 // GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed
309 v_fmamk_f16 v0, 0xff32, 1, v0
310 // GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
311 // GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed
313 //===----------------------------------------------------------------------===//
314 // VOP2 E64.
315 //===----------------------------------------------------------------------===//
317 v_add_co_ci_u32 v5, 0, v1, v2, vcc
318 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
319 // GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU
320 // GFX10: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction
322 v_add_co_ci_u32 v5, vcc, v1, v2, 0
323 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
324 // GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU
325 // GFX10: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction
327 v_add_co_ci_u32 v5, 0, v1, v2, vcc_lo
328 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
329 // GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU
330 // GFX10: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction
332 v_add_co_ci_u32 v5, vcc_lo, v1, v2, 0
333 // GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
334 // GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU
335 // GFX10: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction