Author: Matt Arsenault Date: 2025-03-17T12:50:18-07:00 New Revision: 073ae08864b40310448289c6f40b95ca4f330444
URL: https://github.com/llvm/llvm-project/commit/073ae08864b40310448289c6f40b95ca4f330444 DIFF: https://github.com/llvm/llvm-project/commit/073ae08864b40310448289c6f40b95ca4f330444.diff LOG: AMDGPU: Fix broken broken negative test for gfx950 assembler (#129667) (#129686) Fix's not rejecting global_load_lds_dwordx3 and x4 on other targets. The encoded versions of instructions should not touch SubtargetPredicate, and only AssemblerPredicate. (cherry picked from commit f319a6546613d65661e1ad1ef1a2a648cefee84b) Added: Modified: llvm/lib/Target/AMDGPU/FLATInstructions.td llvm/test/MC/AMDGPU/gfx950_asm_features.s Removed: ################################################################################ diff --git a/llvm/lib/Target/AMDGPU/FLATInstructions.td b/llvm/lib/Target/AMDGPU/FLATInstructions.td index 8fa708b74dde3..dbd5723142d20 100644 --- a/llvm/lib/Target/AMDGPU/FLATInstructions.td +++ b/llvm/lib/Target/AMDGPU/FLATInstructions.td @@ -1873,7 +1873,7 @@ multiclass FLAT_Real_AllAddr_LDS<bits<7> op, bits<7> pre_gfx940_op, } } - let SubtargetPredicate = isGFX940Plus in { + let AssemblerPredicate = isGFX940Plus in { def _gfx940 : FLAT_Real_gfx940<op, !cast<FLAT_Pseudo>(NAME)>; def _SADDR_gfx940 : FLAT_Real_gfx940<op, !cast<FLAT_Pseudo>(NAME#"_SADDR")>; } diff --git a/llvm/test/MC/AMDGPU/gfx950_asm_features.s b/llvm/test/MC/AMDGPU/gfx950_asm_features.s index 389b17296c045..7bc47914f40b7 100644 --- a/llvm/test/MC/AMDGPU/gfx950_asm_features.s +++ b/llvm/test/MC/AMDGPU/gfx950_asm_features.s @@ -1,11 +1,10 @@ // RUN: llvm-mc -triple=amdgcn -mcpu=gfx950 -show-encoding %s | FileCheck --check-prefix=GFX950 --strict-whitespace %s -// xUN: not llvm-mc -triple=amdgcn -mcpu=gfx940 %s 2>&1 | FileCheck --check-prefixes=NOT-GFX950,GFX940 --implicit-check-not=error: %s -// xUN: not llvm-mc -triple=amdgcn -mcpu=gfx90a %s 2>&1 | FileCheck --check-prefixes=NOT-GFX950,GFX90A --implicit-check-not=error: %s -// xUN: not llvm-mc -triple=amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefixes=NOT-GFX950,GFX10 --implicit-check-not=error: %s +// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx942 %s 2>&1 | FileCheck --check-prefixes=NOT-GFX950 --implicit-check-not=error: %s +// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx90a %s 2>&1 | FileCheck --check-prefixes=NOT-GFX950 --implicit-check-not=error: %s +// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefixes=NOT-GFX950 --implicit-check-not=error: %s // NOT-GFX950: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU // GFX950: global_load_lds_dwordx3 v[2:3], off ; encoding: [0x00,0x80,0xf8,0xdd,0x02,0x00,0x7f,0x00] - global_load_lds_dwordx3 v[2:3], off // NOT-GFX950: :[[@LINE+2]]:{{[0-9]+}}: error: _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits