336 lines · plain
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: %s2// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx701 %s 2>&1 | FileCheck --check-prefixes=GFX6-7,GFX6-8,GFX6-9 --implicit-check-not=error: %s3// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx801 %s 2>&1 | FileCheck --check-prefixes=GFX6-8,GFX6-9,GFX8-9 --implicit-check-not=error: %s4// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck --check-prefixes=GFX6-9,GFX8-9 --implicit-check-not=error: %s5// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32 %s 2>&1 | FileCheck --check-prefixes=GFX10 --implicit-check-not=error: %s6// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize64 %s 2>&1 | FileCheck --check-prefixes=GFX10 --implicit-check-not=error: %s7 8//===----------------------------------------------------------------------===//9// ENC_DS.10//===----------------------------------------------------------------------===//11 12// GFX9+.13 14ds_write_b8_d16_hi v1, v215// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU16 17ds_write_b16_d16_hi v1, v218// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU19 20ds_read_u8_d16 v5, v121// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU22 23ds_read_u8_d16_hi v5, v124// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU25 26ds_read_i8_d16 v5, v127// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU28 29ds_read_i8_d16_hi v5, v130// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU31 32ds_read_u16_d16 v5, v133// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU34 35ds_read_u16_d16_hi v5, v136// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU37 38ds_write_addtid_b32 v539// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU40 41ds_read_addtid_b32 v542// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU43 44// GFX8+.45 46ds_add_src2_f32 v147// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU48 49ds_add_f32 v0, v150// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU51 52ds_add_rtn_f32 v0, v1, v253// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU54 55ds_permute_b32 v0, v1, v256// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU57 58ds_bpermute_b32 v0, v1, v259// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU60 61//===----------------------------------------------------------------------===//62// ENC_SOP1.63//===----------------------------------------------------------------------===//64 65// GFX10+.66 67s_and_saveexec_b32 s0, s168// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU69 70s_or_saveexec_b32 s0, s171// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU72 73s_xor_saveexec_b32 s0, s174// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU75 76s_andn2_saveexec_b32 s0, s177// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU78 79s_orn2_saveexec_b32 s0, s180// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU81 82s_nand_saveexec_b32 s0, s183// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU84 85s_nor_saveexec_b32 s0, s186// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU87 88s_xnor_saveexec_b32 s0, s189// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU90 91s_andn1_saveexec_b32 s0, s192// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU93 94s_orn1_saveexec_b32 s0, s195// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU96 97s_andn1_wrexec_b32 s0, s198// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU99 100s_andn2_wrexec_b32 s0, s1101// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU102 103s_movrelsd_2_b32 s0, s1104// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU105 106// GFX9+.107 108s_andn1_saveexec_b64 s[0:1], s[2:3]109// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU110 111s_orn1_saveexec_b64 s[0:1], s[2:3]112// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU113 114s_andn1_wrexec_b64 s[0:1], s[2:3]115// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU116 117s_andn2_wrexec_b64 s[0:1], s[2:3]118// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU119 120s_bitreplicate_b64_b32 s[0:1], s2121// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU122 123// GFX8, GFX9.124 125s_set_gpr_idx_idx s0126// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU127// GFX6-7: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU128 129// GFX6, GFX7, GFX8, GFX9.130 131s_cbranch_join s0132// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU133 134//===----------------------------------------------------------------------===//135// ENC_SOP2.136//===----------------------------------------------------------------------===//137 138// GFX9+.139 140s_lshl1_add_u32 s0, s1, s2141// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU142 143s_lshl2_add_u32 s0, s1, s2144// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU145 146s_lshl3_add_u32 s0, s1, s2147// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU148 149s_lshl4_add_u32 s0, s1, s2150// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU151 152s_mul_hi_u32 s0, s1, s2153// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU154 155s_mul_hi_i32 s0, s1, s2156// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU157 158s_pack_ll_b32_b16 s0, s1, s2159// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU160 161s_pack_lh_b32_b16 s0, s1, s2162// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU163 164s_pack_hh_b32_b16 s0, s1, s2165// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU166 167// GFX8, GFX9.168 169s_rfe_restore_b64 s[0:1], s2170// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU171// GFX6-7: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU172 173// GFX6, GFX7, GFX8, GFX9.174 175s_cbranch_g_fork s[0:1], s[2:3]176// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU177 178//===----------------------------------------------------------------------===//179// ENC_SOPC.180//===----------------------------------------------------------------------===//181 182// GFX8+.183 184s_cmp_eq_u64 s[0:1], s[2:3]185// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU186 187s_cmp_lg_u64 s[0:1], s[2:3]188// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU189 190// GFX6, GFX7, GFX8, GFX9.191 192s_setvskip s0, s1193// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU194 195//===----------------------------------------------------------------------===//196// ENC_SOPK.197//===----------------------------------------------------------------------===//198 199// GFX10+.200 201s_version 0x1234202// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU203 204s_waitcnt_vscnt s0, 0x1234205// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU206 207s_waitcnt_vmcnt s0, 0x1234208// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU209 210s_waitcnt_expcnt s0, 0x1234211// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU212 213s_waitcnt_lgkmcnt s0, 0x1234214// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU215 216s_subvector_loop_begin s0, 0x1234217// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU218 219s_subvector_loop_end s0, 0x1234220// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU221 222// GFX9+.223 224s_call_b64 s[0:1], 0x1234225// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU226 227// GFX6, GFX7, GFX8, GFX9.228 229s_cbranch_i_fork s[0:1], 0x1234230// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU231 232//===----------------------------------------------------------------------===//233// ENC_SOPP.234//===----------------------------------------------------------------------===//235 236// GFX10+.237 238s_code_end239// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU240 241s_inst_prefetch 0x0242// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU243 244s_clause 0x0245// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU246 247s_round_mode 0x0248// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU249 250s_denorm_mode 0x0251// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU252 253s_ttracedata_imm 0x0254// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU255 256// GFX9+.257 258s_endpgm_ordered_ps_done259// GFX6-8: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU260 261// GFX8+.262 263s_wakeup264// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU265 266s_endpgm_saved267// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU268 269//===----------------------------------------------------------------------===//270// DPP8.271//===----------------------------------------------------------------------===//272 273v_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 supported275// GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: not a valid operand276 277//===----------------------------------------------------------------------===//278// VOP2279//===----------------------------------------------------------------------===//280 281v_fmaak_f32 v0, 0xff32ff, v0, 0x11213141282// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU283// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed284 285v_fmamk_f32 v0, 0xff32ff, 0x11213141, v0286// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU287// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed288 289v_fmaak_f32 v0, 0xff32, v0, 0x1122290// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU291// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed292 293v_fmamk_f32 v0, 0xff32, 0x1122, v0294// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU295// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed296 297v_fmaak_f32 v0, 0xff32, v0, 0298// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU299// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed300 301v_fmaak_f16 v0, 0xff32, v0, 0302// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU303// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed304 305v_fmamk_f32 v0, 0xff32, 1, v0306// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU307// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed308 309v_fmamk_f16 v0, 0xff32, 1, v0310// GFX6-9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU311// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed312 313//===----------------------------------------------------------------------===//314// VOP2 E64.315//===----------------------------------------------------------------------===//316 317v_add_co_ci_u32 v5, 0, v1, v2, vcc318// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU319// GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU320// GFX10: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction321 322v_add_co_ci_u32 v5, vcc, v1, v2, 0323// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU324// GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU325// GFX10: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction326 327v_add_co_ci_u32 v5, 0, v1, v2, vcc_lo328// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU329// GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU330// GFX10: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction331 332v_add_co_ci_u32 v5, vcc_lo, v1, v2, 0333// GFX6-7: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU334// GFX8-9: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU335// GFX10: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction336