1// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx601 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX6-7,GFX6-8,GFX6-9 %s 2// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx701 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX6-7,GFX6-8,GFX6-9 %s 3// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx801 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX6-8,GFX6-9 %s 4// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX6-9 %s 5// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -mattr=+WavefrontSize32,-WavefrontSize64 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX10 %s 6// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -mattr=-WavefrontSize32,+WavefrontSize64 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX10 %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 128// GFX6, GFX7, GFX8, GFX9. 129 130s_cbranch_join s0 131// GFX10: error: instruction not supported on this GPU 132 133s_mov_regrd_b32 s0, s1 134// GFX10: error: instruction not supported on this GPU 135 136//===----------------------------------------------------------------------===// 137// ENC_SOP2. 138//===----------------------------------------------------------------------===// 139 140// GFX9+. 141 142s_lshl1_add_u32 s0, s1, s2 143// GFX6-8: error: instruction not supported on this GPU 144 145s_lshl2_add_u32 s0, s1, s2 146// GFX6-8: error: instruction not supported on this GPU 147 148s_lshl3_add_u32 s0, s1, s2 149// GFX6-8: error: instruction not supported on this GPU 150 151s_lshl4_add_u32 s0, s1, s2 152// GFX6-8: error: instruction not supported on this GPU 153 154s_mul_hi_u32 s0, s1, s2 155// GFX6-8: error: instruction not supported on this GPU 156 157s_mul_hi_i32 s0, s1, s2 158// GFX6-8: error: instruction not supported on this GPU 159 160s_pack_ll_b32_b16 s0, s1, s2 161// GFX6-8: error: instruction not supported on this GPU 162 163s_pack_lh_b32_b16 s0, s1, s2 164// GFX6-8: error: instruction not supported on this GPU 165 166s_pack_hh_b32_b16 s0, s1, s2 167// GFX6-8: error: instruction not supported on this GPU 168 169// GFX8, GFX9. 170 171s_rfe_restore_b64 s[0:1], s2 172// GFX10: error: instruction not supported on this GPU 173 174// GFX6, GFX7, GFX8, GFX9. 175 176s_cbranch_g_fork s[0:1], s[2:3] 177// GFX10: error: instruction not supported on this GPU 178 179//===----------------------------------------------------------------------===// 180// ENC_SOPC. 181//===----------------------------------------------------------------------===// 182 183// GFX8+. 184 185s_cmp_eq_u64 s[0:1], s[2:3] 186// GFX6-7: error: instruction not supported on this GPU 187 188s_cmp_lg_u64 s[0:1], s[2:3] 189// GFX6-7: error: instruction not supported on this GPU 190 191// GFX6, GFX7, GFX8, GFX9. 192 193s_setvskip s0, s1 194// GFX10: error: instruction not supported on this GPU 195 196//===----------------------------------------------------------------------===// 197// ENC_SOPK. 198//===----------------------------------------------------------------------===// 199 200// GFX10+. 201 202s_version 0x1234 203// GFX6-9: error: instruction not supported on this GPU 204 205s_waitcnt_vscnt s0, 0x1234 206// GFX6-9: error: instruction not supported on this GPU 207 208s_waitcnt_vmcnt s0, 0x1234 209// GFX6-9: error: instruction not supported on this GPU 210 211s_waitcnt_expcnt s0, 0x1234 212// GFX6-9: error: instruction not supported on this GPU 213 214s_waitcnt_lgkmcnt s0, 0x1234 215// GFX6-9: error: instruction not supported on this GPU 216 217s_subvector_loop_begin s0, 0x1234 218// GFX6-9: error: instruction not supported on this GPU 219 220s_subvector_loop_end s0, 0x1234 221// GFX6-9: error: instruction not supported on this GPU 222 223// GFX9+. 224 225s_call_b64 s[0:1], 0x1234 226// GFX6-8: error: instruction not supported on this GPU 227 228// GFX6, GFX7, GFX8, GFX9. 229 230s_cbranch_i_fork s[0:1], 0x1234 231// GFX10: error: instruction not supported on this GPU 232 233//===----------------------------------------------------------------------===// 234// ENC_SOPP. 235//===----------------------------------------------------------------------===// 236 237// GFX10+. 238 239s_code_end 240// GFX6-9: error: instruction not supported on this GPU 241 242s_inst_prefetch 0x0 243// GFX6-9: error: instruction not supported on this GPU 244 245s_clause 0x0 246// GFX6-9: error: instruction not supported on this GPU 247 248s_round_mode 0x0 249// GFX6-9: error: instruction not supported on this GPU 250 251s_denorm_mode 0x0 252// GFX6-9: error: instruction not supported on this GPU 253 254s_ttracedata_imm 0x0 255// GFX6-9: error: instruction not supported on this GPU 256 257// GFX9+. 258 259s_endpgm_ordered_ps_done 260// GFX6-8: error: instruction not supported on this GPU 261 262// GFX8+. 263 264s_wakeup 265// GFX6-7: error: instruction not supported on this GPU 266 267s_endpgm_saved 268// GFX6-7: error: instruction not supported on this GPU 269 270//===----------------------------------------------------------------------===// 271// DPP8. 272//===----------------------------------------------------------------------===// 273 274v_mov_b32_dpp v5, v1 dpp8:[0,1,2,3,4,5,6,7] 275// GFX6-9: error: not a valid operand 276