[llvm] [AMDGPU][MC] Improving assembler error message for unsupported instructions (PR #185778)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 16:54:56 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Jun Wang (jwanggit86)

<details>
<summary>Changes</summary>

The updated error message shows both the instruction name and the GPU target name.

---

Patch is 2.40 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/185778.diff


58 Files Affected:

- (modified) llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp (+2-1) 
- (modified) llvm/test/MC/AMDGPU/add-sub-no-carry.s (+21-21) 
- (modified) llvm/test/MC/AMDGPU/dpp64.s (+1-1) 
- (modified) llvm/test/MC/AMDGPU/ds-gfx9.s (+10-10) 
- (modified) llvm/test/MC/AMDGPU/flat-scratch-st-mode.s (+29-26) 
- (modified) llvm/test/MC/AMDGPU/gfx10-constant-bus.s (+1-1) 
- (modified) llvm/test/MC/AMDGPU/gfx1011_err.s (+32-17) 
- (modified) llvm/test/MC/AMDGPU/gfx1030_err.s (+315-51) 
- (modified) llvm/test/MC/AMDGPU/gfx1030_unsupported.s (+1-1) 
- (modified) llvm/test/MC/AMDGPU/gfx10_flat_instructions_err.s (+2-2) 
- (modified) llvm/test/MC/AMDGPU/gfx10_unsupported.s (+2210-1106) 
- (modified) llvm/test/MC/AMDGPU/gfx11_asm_mimg_err.s (+20-20) 
- (modified) llvm/test/MC/AMDGPU/gfx11_asm_vop2_fake16_err.s (+18-18) 
- (modified) llvm/test/MC/AMDGPU/gfx11_unsupported.s (+691-691) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_sop1.s (+12-12) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_sopp_err.s (+1-1) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vflat.s (+313-418) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vimage.s (+8-8) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop1_dpp16-fake16.s (+177-177) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop1_dpp16.s (+193-193) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop1_dpp8-fake16.s (+46-46) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop1_dpp8.s (+62-62) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop2.s (+167-167) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_dpp16-fake16.s (+124-124) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_dpp16.s (+124-124) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_dpp8-fake16.s (+86-86) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_dpp8.s (+86-86) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_from_vop1_dpp16-fake16.s (+156-156) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_from_vop1_dpp16.s (+170-170) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_from_vop1_dpp8-fake16.s (+39-39) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_from_vop1_dpp8.s (+53-53) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3p.s (+370-370) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3p_dpp16.s (+3-3) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3p_dpp8.s (+6-6) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vsample_err.s (+58-58) 
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_wmma_w32.s (+383-383) 
- (modified) llvm/test/MC/AMDGPU/gfx12_unsupported.s (+82-82) 
- (modified) llvm/test/MC/AMDGPU/gfx7_unsupported.s (+863-863) 
- (modified) llvm/test/MC/AMDGPU/gfx8_unsupported.s (+613-613) 
- (modified) llvm/test/MC/AMDGPU/gfx9-asm-err.s (+1-1) 
- (modified) llvm/test/MC/AMDGPU/gfx90a_err.s (+52-52) 
- (modified) llvm/test/MC/AMDGPU/gfx942_err.s (+12-12) 
- (modified) llvm/test/MC/AMDGPU/gfx942_unsupported.s (+3-3) 
- (modified) llvm/test/MC/AMDGPU/gfx950_asm_features.s (+1185-397) 
- (modified) llvm/test/MC/AMDGPU/gfx950_asm_read_tr.s (+10-10) 
- (modified) llvm/test/MC/AMDGPU/gfx950_asm_vop1.s (+32-32) 
- (modified) llvm/test/MC/AMDGPU/gfx950_asm_vop3.s (+72-72) 
- (modified) llvm/test/MC/AMDGPU/gfx950_err.s (+6-6) 
- (modified) llvm/test/MC/AMDGPU/gfx9_4_generic_unsupported.s (+34-34) 
- (modified) llvm/test/MC/AMDGPU/gfx9_unsupported.s (+353-353) 
- (modified) llvm/test/MC/AMDGPU/literals.s (+414-311) 
- (modified) llvm/test/MC/AMDGPU/literalv216.s (+1-1) 
- (modified) llvm/test/MC/AMDGPU/mimg-err-gfx942.s (+26-26) 
- (modified) llvm/test/MC/AMDGPU/mimg-err.s (+1-1) 
- (modified) llvm/test/MC/AMDGPU/mubuf-gfx9.s (+21-21) 
- (modified) llvm/test/MC/AMDGPU/reg-syntax-extra.s (+7-7) 
- (modified) llvm/test/MC/AMDGPU/vop3-literal.s (+12-12) 
- (modified) llvm/test/MC/AMDGPU/vopc-vi.s (+200-68) 


``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
index fddb36133afb8..180412ac2bc5c 100644
--- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
@@ -5771,7 +5771,8 @@ bool AMDGPUAsmParser::checkUnsupportedInstruction(StringRef Mnemo,
 
   // Finally check if this instruction is supported on any other GPU.
   if (isSupportedMnemo(Mnemo, FeatureBitset().set())) {
-    return Error(IDLoc, "instruction not supported on this GPU");
+    return Error(IDLoc, "instruction not supported on this GPU (" +
+                            getSTI().getCPU() + ")" + ": " + Mnemo);
   }
 
   // Instruction not supported on any GPU. Probably a typo.
diff --git a/llvm/test/MC/AMDGPU/add-sub-no-carry.s b/llvm/test/MC/AMDGPU/add-sub-no-carry.s
index f06ed6428e878..48963596a60a0 100644
--- a/llvm/test/MC/AMDGPU/add-sub-no-carry.s
+++ b/llvm/test/MC/AMDGPU/add-sub-no-carry.s
@@ -10,107 +10,107 @@
 
 
 v_add_u32 v1, 4.0, v2
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_add_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_add_u32_e32 v1, 4.0, v2               ; encoding: [0xf6,0x04,0x02,0x68]
 
 v_add_u32 v1, s1, v2
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_add_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_add_u32_e32 v1, s1, v2                ; encoding: [0x01,0x04,0x02,0x68]
 
 v_add_u32 v1, v2, 4.0
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_add_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_add_u32_e64 v1, v2, 4.0               ; encoding: [0x01,0x00,0x34,0xd1,0x02,0xed,0x01,0x00]
 
 v_add_u32 v1, v2, s1
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_add_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_add_u32_e64 v1, v2, s1                ; encoding: [0x01,0x00,0x34,0xd1,0x02,0x03,0x00,0x00]
 
 
 v_add_u32 v1, v2, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_add_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_add_u32_e32 v1, v2, v3                ; encoding: [0x02,0x07,0x02,0x68]
 
 v_add_u32_e32 v1, s1, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_add_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_add_u32_e32 v1, s1, v3                ; encoding: [0x01,0x06,0x02,0x68]
 
 v_add_u32_e32 v1, v2, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_add_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_add_u32_e32 v1, v2, v3                ; encoding: [0x02,0x07,0x02,0x68]
 
 v_sub_u32 v1, 4.0, v2
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_sub_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_sub_u32_e32 v1, 4.0, v2               ; encoding: [0xf6,0x04,0x02,0x6a]
 
 v_sub_u32 v1, s1, v2
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_sub_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_sub_u32_e32 v1, s1, v2                ; encoding: [0x01,0x04,0x02,0x6a]
 
 v_sub_u32 v1, v2, 4.0
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_sub_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_sub_u32_e64 v1, v2, 4.0               ; encoding: [0x01,0x00,0x35,0xd1,0x02,0xed,0x01,0x00]
 
 v_sub_u32 v1, v2, s1
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_sub_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_sub_u32_e64 v1, v2, s1                ; encoding: [0x01,0x00,0x35,0xd1,0x02,0x03,0x00,0x00]
 
 v_sub_u32 v1, v2, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_sub_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_sub_u32_e32 v1, v2, v3                ; encoding: [0x02,0x07,0x02,0x6a]
 
 v_sub_u32_e32 v1, s1, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_sub_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_sub_u32_e32 v1, s1, v3                ; encoding: [0x01,0x06,0x02,0x6a]
 
 v_sub_u32_e32 v1, v2, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_sub_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_sub_u32_e32 v1, v2, v3                ; encoding: [0x02,0x07,0x02,0x6a]
 
 v_subrev_u32 v1, 4.0, v2
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_subrev_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_subrev_u32_e32 v1, 4.0, v2            ; encoding: [0xf6,0x04,0x02,0x6c]
 
 v_subrev_u32 v1, s1, v2
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_subrev_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_subrev_u32_e32 v1, s1, v2             ; encoding: [0x01,0x04,0x02,0x6c]
 
 v_subrev_u32 v1, v2, 4.0
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_subrev_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_subrev_u32_e64 v1, v2, 4.0            ; encoding: [0x01,0x00,0x36,0xd1,0x02,0xed,0x01,0x00]
 
 v_subrev_u32 v1, v2, s1
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_subrev_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_subrev_u32_e64 v1, v2, s1             ; encoding: [0x01,0x00,0x36,0xd1,0x02,0x03,0x00,0x00]
 
 v_subrev_u32 v1, v2, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_subrev_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_subrev_u32_e32 v1, v2, v3             ; encoding: [0x02,0x07,0x02,0x6c]
 
 v_subrev_u32_e32 v1, s1, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_subrev_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_subrev_u32_e32 v1, s1, v3             ; encoding: [0x01,0x06,0x02,0x6c]
 
 v_subrev_u32_e32 v1, v2, v3
-// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// ERR-SICI: :[[@LINE-1]]:1: error: instruction not supported on this GPU (bonaire): v_subrev_u32
 // ERR-VI: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
 // GFX9: v_subrev_u32_e32 v1, v2, v3             ; encoding: [0x02,0x07,0x02,0x6c]
diff --git a/llvm/test/MC/AMDGPU/dpp64.s b/llvm/test/MC/AMDGPU/dpp64.s
index 8a1e985f83925..31ea9ba1fa55f 100644
--- a/llvm/test/MC/AMDGPU/dpp64.s
+++ b/llvm/test/MC/AMDGPU/dpp64.s
@@ -23,7 +23,7 @@ v_floor_f64 v[4:5], v[0:1] row_newbcast:15
 // GFX90A: v_floor_f64_dpp v[4:5], v[0:1] row_newbcast:15 row_mask:0xf bank_mask:0xf ; encoding: [0xfa,0x34,0x08,0x7e,0x00,0x5f,0x01,0xff]
 
 v_fmac_f64 v[0:1], v[2:3], v[4:5] row_newbcast:2
-// GFX900: :[[@LINE-1]]:1: error: instruction not supported on this GPU
+// GFX900: :[[@LINE-1]]:1: error: instruction not supported on this GPU (gfx900): v_fmac_f64
 // GFX90A: v_fmac_f64_dpp v[0:1], v[2:3], v[4:5] row_newbcast:2 row_mask:0xf bank_mask:0xf ; encoding: [0xfa,0x08,0x00,0x08,0x02,0x52,0x01,0xff]
 
 v_fract_f64 v[4:5], v[0:1] row_newbcast:1
diff --git a/llvm/test/MC/AMDGPU/ds-gfx9.s b/llvm/test/MC/AMDGPU/ds-gfx9.s
index f3f3dcd17e611..3e073afed770e 100644
--- a/llvm/test/MC/AMDGPU/ds-gfx9.s
+++ b/llvm/test/MC/AMDGPU/ds-gfx9.s
@@ -4,40 +4,40 @@
 
 ds_read_addtid_b32 v8
 // GFX9: ds_read_addtid_b32 v8                   ; encoding: [0x00,0x00,0x6c,0xd9,0x00,0x00,0x00,0x08]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_read_addtid_b32
 
 ds_read_i8_d16 v8, v2
 // GFX9: ds_read_i8_d16 v8, v2                   ; encoding: [0x00,0x00,0xb0,0xd8,0x02,0x00,0x00,0x08]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_read_i8_d16
 
 ds_read_i8_d16_hi v8, v2
 // GFX9: ds_read_i8_d16_hi v8, v2                ; encoding: [0x00,0x00,0xb2,0xd8,0x02,0x00,0x00,0x08]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_read_i8_d16_hi
 
 ds_read_u16_d16 v8, v2
 // GFX9: ds_read_u16_d16 v8, v2                  ; encoding: [0x00,0x00,0xb4,0xd8,0x02,0x00,0x00,0x08]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_read_u16_d16
 
 ds_read_u16_d16_hi v8, v2
 // GFX9: ds_read_u16_d16_hi v8, v2               ; encoding: [0x00,0x00,0xb6,0xd8,0x02,0x00,0x00,0x08]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_read_u16_d16_hi
 
 ds_read_u8_d16 v8, v2
 // GFX9: ds_read_u8_d16 v8, v2                   ; encoding: [0x00,0x00,0xac,0xd8,0x02,0x00,0x00,0x08]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_read_u8_d16
 
 ds_read_u8_d16_hi v8, v2
 // GFX9: ds_read_u8_d16_hi v8, v2                ; encoding: [0x00,0x00,0xae,0xd8,0x02,0x00,0x00,0x08]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_read_u8_d16_hi
 
 ds_write_addtid_b32 v8
 // GFX9: ds_write_addtid_b32 v8                  ; encoding: [0x00,0x00,0x3a,0xd8,0x00,0x08,0x00,0x00]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_write_addtid_b32
 
 ds_write_b16_d16_hi v8, v2
 // GFX9: ds_write_b16_d16_hi v8, v2              ; encoding: [0x00,0x00,0xaa,0xd8,0x08,0x02,0x00,0x00]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_write_b16_d16_hi
 
 ds_write_b8_d16_hi v8, v2
 // GFX9: ds_write_b8_d16_hi v8, v2               ; encoding: [0x00,0x00,0xa8,0xd8,0x08,0x02,0x00,0x00]
-// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-2]]:1: error: instruction not supported on this GPU (tonga): ds_write_b8_d16_hi
diff --git a/llvm/test/MC/AMDGPU/flat-scratch-st-mode.s b/llvm/test/MC/AMDGPU/flat-scratch-st-mode.s
index 702ece4c119ec..a672149482952 100644
--- a/llvm/test/MC/AMDGPU/flat-scratch-st-mode.s
+++ b/llvm/test/MC/AMDGPU/flat-scratch-st-mode.s
@@ -1,126 +1,129 @@
 // NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --unique --sort --version 6
 // RUN: not llvm-mc -triple=amdgcn -mcpu=tonga -filetype=null 2>&1 %s | FileCheck -check-prefix=VI-ERR --implicit-check-not=error: %s
-// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 -filetype=null 2>&1 %s | FileCheck -check-prefix=GFX9_10-ERR --implicit-check-not=error: %s
-// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1010 -filetype=null 2>&1 %s | FileCheck --check-prefixes=GFX9_10-ERR --implicit-check-not=error: %s
+// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 -filetype=null 2>&1 %s | FileCheck -check-prefixes=GFX9-ERR,GFX9_10-ERR --implicit-check-not=error: %s
+// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1010 -filetype=null 2>&1 %s | FileCheck --check-prefixes=GFX1010-ERR,GFX9_10-ERR --implicit-check-not=error: %s
 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1030 -show-encoding %s | FileCheck --check-prefixes=GFX1030 %s
 
 scratch_load_dword v1, off, off
 // GFX1030: scratch_load_dword v1, off, off         ; encoding: [0x00,0x40,0x30,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_dword
 
 scratch_load_dword v1, off, off offset:2047
 // GFX1030: scratch_load_dword v1, off, off offset:2047 ; encoding: [0xff,0x47,0x30,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_dword
 
 scratch_load_dwordx2 v[1:2], off, off
 // GFX1030: scratch_load_dwordx2 v[1:2], off, off   ; encoding: [0x00,0x40,0x34,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_dwordx2
 
 scratch_load_dwordx3 v[1:3], off, off
 // GFX1030: scratch_load_dwordx3 v[1:3], off, off   ; encoding: [0x00,0x40,0x3c,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_dwordx3
 
 scratch_load_dwordx4 v[1:4], off, off
 // GFX1030: scratch_load_dwordx4 v[1:4], off, off   ; encoding: [0x00,0x40,0x38,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_dwordx4
 
 scratch_load_sbyte v1, off, off
 // GFX1030: scratch_load_sbyte v1, off, off         ; encoding: [0x00,0x40,0x24,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_sbyte
 
 scratch_load_sbyte_d16 v1, off, off
 // GFX1030: scratch_load_sbyte_d16 v1, off, off     ; encoding: [0x00,0x40,0x88,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_sbyte_d16
 
 scratch_load_sbyte_d16_hi v1, off, off
 // GFX1030: scratch_load_sbyte_d16_hi v1, off, off  ; encoding: [0x00,0x40,0x8c,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_sbyte_d16_hi
 
 scratch_load_short_d16 v1, off, off
 // GFX1030: scratch_load_short_d16 v1, off, off     ; encoding: [0x00,0x40,0x90,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_short_d16
 
 scratch_load_short_d16_hi v1, off, off
 // GFX1030: scratch_load_short_d16_hi v1, off, off  ; encoding: [0x00,0x40,0x94,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_short_d16_hi
 
 scratch_load_sshort v1, off, off
 // GFX1030: scratch_load_sshort v1, off, off        ; encoding: [0x00,0x40,0x2c,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_sshort
 
 scratch_load_ubyte v1, off, off
 // GFX1030: scratch_load_ubyte v1, off, off         ; encoding: [0x00,0x40,0x20,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_ubyte
 
 scratch_load_ubyte_d16 v1, off, off
 // GFX1030: scratch_load_ubyte_d16 v1, off, off     ; encoding: [0x00,0x40,0x80,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_ubyte_d16
 
 scratch_load_ubyte_d16_hi v1, off, off
 // GFX1030: scratch_load_ubyte_d16_hi v1, off, off  ; encoding: [0x00,0x40,0x84,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_ubyte_d16_hi
 
 scratch_load_ushort v1, off, off
 // GFX1030: scratch_load_ushort v1, off, off        ; encoding: [0x00,0x40,0x28,0xdc,0x00,0x00,0x7f,0x01]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scratch_load_ushort
 
 scratch_store_byte off, v2, off
 // GFX1030: scratch_store_byte off, v2, off         ; encoding: [0x00,0x40,0x60,0xdc,0x00,0x02,0x7f,0x00]
 // GFX9_10-ERR: :[[@LINE-2]]:1: error: operands are not valid for this GPU or mode
-// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU
+// VI-ERR: :[[@LINE-3]]:1: error: instruction not supported on this GPU (tonga): scr...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/185778


More information about the llvm-commits mailing list