[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
Fri Oct 10 01:02:11 PDT 2025


================
@@ -2329,6 +2329,16 @@ def isGFX8GFX9NotGFX90A :
             " Subtarget->getGeneration() == AMDGPUSubtarget::GFX9)">,
   AssemblerPredicate<(all_of FeatureGFX8Insts, FeatureGCN3Encoding, (not FeatureGFX90AInsts))>;
 
+def isGFX9NotGFX90A :
+  Predicate<"!Subtarget->hasGFX90AInsts() &&"
+            " Subtarget->getGeneration() == AMDGPUSubtarget::GFX9)">,
+  AssemblerPredicate<(all_of FeatureGFX9Insts, (not FeatureGFX90AInsts), (not FeatureGFX10Insts))>;
+
+def isGFX8orGFX9After908 :
+  Predicate<"(Subtarget->getGeneration() == AMDGPUSubtarget::VOLCANIC_ISLANDS) ||"
+            " ((Subtarget->getGeneration() == AMDGPUSubtarget::GFX9) && Subtarget->hasGFX90AInsts())">,
+  AssemblerPredicate <(any_of FeatureVolcanicIslands, FeatureGFX90AInsts)>;
----------------
arsenm wrote:

Yes, this is incomprehensible spaghetti and why you should not use generation checks. Just directly add an nv bit feature 

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


More information about the llvm-commits mailing list