[llvm] [AMDGPU][MC] GFX9 - Support NV bit in FLAT instructions in pre-GFX90A (PR #154237)
Jun Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 25 11:21:38 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)>;
----------------
jwanggit86 wrote:
The first, `isGFX9NotGFX90A`, tests that the target is GFX9 but pre-90A, and also not GFX10+. So, maybe change to `isGFX9NotGFX90APlus`, or `isGFX9UptoGFX90A`?
The 2nd, `isGFX8orGFX9After908`, tests that the target is GFX8, or GFX9's after 908, i.e., 90A and later. Any suggestions?
https://github.com/llvm/llvm-project/pull/154237
More information about the llvm-commits
mailing list