[llvm] [AMDGPU][MC] GFX9 - Support NV bit in FLAT instructions in pre-GFX90A (PR #154237)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 06:21:51 PDT 2025


================
@@ -1585,6 +1585,11 @@ class AMDGPUAsmParser : public MCTargetAsmParser {
 
   bool hasKernargPreload() const { return AMDGPU::hasKernargPreload(getSTI()); }
 
+  bool isFlatInstAndNVAllowed(const MCInst &Inst) const {
+    uint64_t TSFlags = MII.get(Inst.getOpcode()).TSFlags;
+    return (TSFlags & SIInstrFlags::FLAT) && isGFX9() && !isGFX90A();
+  }
----------------
arsenm wrote:

If the assembler predicates are set correctly, you shouldn't need to manually check this 

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


More information about the llvm-commits mailing list