[llvm] [AMDGPU][True16][CodeGen] add a d16 predicate for true16 mode (PR #156574)

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 11:16:49 PDT 2025


================
@@ -2564,6 +2570,13 @@ def UseFakeTrue16Insts : True16PredicateClass<"Subtarget->hasTrue16BitInsts() &&
   // FIXME When we default to RealTrue16 instead of Fake, change the line as follows.
   // AssemblerPredicate<(all_of FeatureTrue16BitInsts, (not FeatureRealTrue16Insts))>;
 
+// Use D16 Insts in true16 mode
+def UseRealTrueD16Insts : TrueD16PredicateClass<"Subtarget->useRealTrueD16Insts()">,
+  AssemblerPredicate<(all_of FeatureTrue16BitInsts, FeatureRealTrue16Insts, FeatureRealTrueD16Insts)>;
+def NotUseRealTrueD16Insts : TrueD16PredicateClass<"Subtarget->useRealTrue16Insts() && "
+                                                    "!Subtarget->useRealTrueD16Insts()">,
+  AssemblerPredicate<(all_of FeatureTrue16BitInsts, FeatureRealTrue16Insts)>;
+
----------------
broxigarchen wrote:

I think we want to turn off D16 in GFX11 true16 mode, then it should not be in the GFX11 feature list

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


More information about the llvm-commits mailing list