1// RUN: not llvm-mc -arch=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 -arch=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 -arch=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 -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck --check-prefixes=GFX6-9,GFX8-9 --implicit-check-not=error: %s 5// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32,-wavefrontsize64 %s 2>&1 | FileCheck --check-prefixes=GFX10 --implicit-check-not=error: %s 6// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -mattr=-wavefrontsize32,+wavefrontsize64 %s 2>&1 | FileCheck --check-prefixes=GFX10 --implicit-check-not=error: %s 7 8//===----------------------------------------------------------------------===// 9// ENC_DS. 10//===----------------------------------------------------------------------===// 11 12// GFX9+. 13 14ds_write_b8_d16_hi v1, v2 15// GFX6-8: error: instruction not supported on this GPU 16 17ds_write_b16_d16_hi v1, v2 18// GFX6-8: error: instruction not supported on this GPU 19 20ds_read_u8_d16 v5, v1 21// GFX6-8: error: instruction not supported on this GPU 22 23ds_read_u8_d16_hi v5, v1 24// GFX6-8: error: instruction not supported on this GPU 25 26ds_read_i8_d16 v5, v1 27// GFX6-8: error: instruction not supported on this GPU 28 29ds_read_i8_d16_hi v5, v1 30// GFX6-8: error: instruction not supported on this GPU 31 32ds_read_u16_d16 v5, v1 33// GFX6-8: error: instruction not supported on this GPU 34 35ds_read_u16_d16_hi v5, v1 36// GFX6-8: error: instruction not supported on this GPU 37 38ds_write_addtid_b32 v5 39// GFX6-8: error: instruction not supported on this GPU 40 41ds_read_addtid_b32 v5 42// GFX6-8: error: instruction not supported on this GPU 43 44// GFX8+. 45 46ds_add_src2_f32 v1 47// GFX6-7: error: instruction not supported on this GPU 48 49ds_add_f32 v0, v1 50// GFX6-7: error: instruction not supported on this GPU 51 52ds_add_rtn_f32 v0, v1, v2 53// GFX6-7: error: instruction not supported on this GPU 54 55ds_permute_b32 v0, v1, v2 56// GFX6-7: error: instruction not supported on this GPU 57 58ds_bpermute_b32 v0, v1, v2 59// GFX6-7: error: instruction not supported on this GPU 60 61//===----------------------------------------------------------------------===// 62// ENC_SOP1. 63//===----------------------------------------------------------------------===// 64 65// GFX10+. 66 67s_and_saveexec_b32 s0, s1 68// GFX6-9: error: instruction not supported on this GPU 69 70s_or_saveexec_b32 s0, s1 71// GFX6-9: error: instruction not supported on this GPU 72 73s_xor_saveexec_b32 s0, s1 74// GFX6-9: error: instruction not supported on this GPU 75 76s_andn2_saveexec_b32 s0, s1 77// GFX6-9: error: instruction not supported on this GPU 78 79s_orn2_saveexec_b32 s0, s1 80// GFX6-9: error: instruction not supported on this GPU 81 82s_nand_saveexec_b32 s0, s1 83// GFX6-9: error: instruction not supported on this GPU 84 85s_nor_saveexec_b32 s0, s1 86// GFX6-9: error: instruction not supported on this GPU 87 88s_xnor_saveexec_b32 s0, s1 89// GFX6-9: error: instruction not supported on this GPU 90 91s_andn1_saveexec_b32 s0, s1 92// GFX6-9: error: instruction not supported on this GPU 93 94s_orn1_saveexec_b32 s0, s1 95// GFX6-9: error: instruction not supported on this GPU 96 97s_andn1_wrexec_b32 s0, s1 98// GFX6-9: error: instruction not supported on this GPU 99 100s_andn2_wrexec_b32 s0, s1 101// GFX6-9: error: instruction not supported on this GPU 102 103s_movrelsd_2_b32 s0, s1 104// GFX6-9: error: instruction not supported on this GPU 105 106// GFX9+. 107 108s_andn1_saveexec_b64 s[0:1], s[2:3] 109// GFX6-8: error: instruction not supported on this GPU 110 111s_orn1_saveexec_b64 s[0:1], s[2:3] 112// GFX6-8: error: instruction not supported on this GPU 113 114s_andn1_wrexec_b64 s[0:1], s[2:3] 115// GFX6-8: error: instruction not supported on this GPU 116 117s_andn2_wrexec_b64 s[0:1], s[2:3] 118// GFX6-8: error: instruction not supported on this GPU 119 120s_bitreplicate_b64_b32 s[0:1], s2 121// GFX6-8: error: instruction not supported on this GPU 122 123// GFX8, GFX9. 124 125s_set_gpr_idx_idx s0 126// GFX10: error: instruction not supported on this GPU 127// GFX6-7: error: instruction not supported on this GPU 128 129// GFX6, GFX7, GFX8, GFX9. 130 131s_cbranch_join s0 132// GFX10: error: instruction not supported on this GPU 133 134//===----------------------------------------------------------------------===// 135// ENC_SOP2. 136//===----------------------------------------------------------------------===// 137 138// GFX9+. 139 140s_lshl1_add_u32 s0, s1, s2 141// GFX6-8: error: instruction not supported on this GPU 142 143s_lshl2_add_u32 s0, s1, s2 144// GFX6-8: error: instruction not supported on this GPU 145 146s_lshl3_add_u32 s0, s1, s2 147// GFX6-8: error: instruction not supported on this GPU 148 149s_lshl4_add_u32 s0, s1, s2 150// GFX6-8: error: instruction not supported on this GPU 151 152s_mul_hi_u32 s0, s1, s2 153// GFX6-8: error: instruction not supported on this GPU 154 155s_mul_hi_i32 s0, s1, s2 156// GFX6-8: error: instruction not supported on this GPU 157 158s_pack_ll_b32_b16 s0, s1, s2 159// GFX6-8: error: instruction not supported on this GPU 160 161s_pack_lh_b32_b16 s0, s1, s2 162// GFX6-8: error: instruction not supported on this GPU 163 164s_pack_hh_b32_b16 s0, s1, s2 165// GFX6-8: error: instruction not supported on this GPU 166 167// GFX8, GFX9. 168 169s_rfe_restore_b64 s[0:1], s2 170// GFX10: error: instruction not supported on this GPU 171// GFX6-7: error: instruction not supported on this GPU 172 173// GFX6, GFX7, GFX8, GFX9. 174 175s_cbranch_g_fork s[0:1], s[2:3] 176// GFX10: error: instruction not supported on this GPU 177 178//===----------------------------------------------------------------------===// 179// ENC_SOPC. 180//===----------------------------------------------------------------------===// 181 182// GFX8+. 183 184s_cmp_eq_u64 s[0:1], s[2:3] 185// GFX6-7: error: instruction not supported on this GPU 186 187s_cmp_lg_u64 s[0:1], s[2:3] 188// GFX6-7: error: instruction not supported on this GPU 189 190// GFX6, GFX7, GFX8, GFX9. 191 192s_setvskip s0, s1 193// GFX10: error: instruction not supported on this GPU 194 195//===----------------------------------------------------------------------===// 196// ENC_SOPK. 197//===----------------------------------------------------------------------===// 198 199// GFX10+. 200 201s_version 0x1234 202// GFX6-9: error: instruction not supported on this GPU 203 204s_waitcnt_vscnt s0, 0x1234 205// GFX6-9: error: instruction not supported on this GPU 206 207s_waitcnt_vmcnt s0, 0x1234 208// GFX6-9: error: instruction not supported on this GPU 209 210s_waitcnt_expcnt s0, 0x1234 211// GFX6-9: error: instruction not supported on this GPU 212 213s_waitcnt_lgkmcnt s0, 0x1234 214// GFX6-9: error: instruction not supported on this GPU 215 216s_subvector_loop_begin s0, 0x1234 217// GFX6-9: error: instruction not supported on this GPU 218 219s_subvector_loop_end s0, 0x1234 220// GFX6-9: error: instruction not supported on this GPU 221 222// GFX9+. 223 224s_call_b64 s[0:1], 0x1234 225// GFX6-8: error: instruction not supported on this GPU 226 227// GFX6, GFX7, GFX8, GFX9. 228 229s_cbranch_i_fork s[0:1], 0x1234 230// GFX10: error: instruction not supported on this GPU 231 232//===----------------------------------------------------------------------===// 233// ENC_SOPP. 234//===----------------------------------------------------------------------===// 235 236// GFX10+. 237 238s_code_end 239// GFX6-9: error: instruction not supported on this GPU 240 241s_inst_prefetch 0x0 242// GFX6-9: error: instruction not supported on this GPU 243 244s_clause 0x0 245// GFX6-9: error: instruction not supported on this GPU 246 247s_round_mode 0x0 248// GFX6-9: error: instruction not supported on this GPU 249 250s_denorm_mode 0x0 251// GFX6-9: error: instruction not supported on this GPU 252 253s_ttracedata_imm 0x0 254// GFX6-9: error: instruction not supported on this GPU 255 256// GFX9+. 257 258s_endpgm_ordered_ps_done 259// GFX6-8: error: instruction not supported on this GPU 260 261// GFX8+. 262 263s_wakeup 264// GFX6-7: error: instruction not supported on this GPU 265 266s_endpgm_saved 267// GFX6-7: error: instruction not supported on this GPU 268 269//===----------------------------------------------------------------------===// 270// DPP8. 271//===----------------------------------------------------------------------===// 272 273v_mov_b32_dpp v5, v1 dpp8:[0,1,2,3,4,5,6,7] 274// GFX6-7: error: dpp variant of this instruction is not supported 275// GFX8-9: error: not a valid operand 276 277//===----------------------------------------------------------------------===// 278// VOP2 E64. 279//===----------------------------------------------------------------------===// 280 281v_add_co_ci_u32 v5, 0, v1, v2, vcc 282// GFX6-7: error: instruction not supported on this GPU 283// GFX8-9: error: instruction not supported on this GPU 284// GFX10: error: invalid operand for instruction 285 286v_add_co_ci_u32 v5, vcc, v1, v2, 0 287// GFX6-7: error: instruction not supported on this GPU 288// GFX8-9: error: instruction not supported on this GPU 289// GFX10: error: invalid operand for instruction 290 291v_add_co_ci_u32 v5, 0, v1, v2, vcc_lo 292// GFX6-7: error: instruction not supported on this GPU 293// GFX8-9: error: instruction not supported on this GPU 294// GFX10: error: invalid operand for instruction 295 296v_add_co_ci_u32 v5, vcc_lo, v1, v2, 0 297// GFX6-7: error: instruction not supported on this GPU 298// GFX8-9: error: instruction not supported on this GPU 299// GFX10: error: invalid operand for instruction 300