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

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 10:36:54 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 about it. We might need similar flag in ECC feature and thus using a D16HWBUG flag would be more beneficial.

Changing to D16HWBUG flag and add it to gfx11 feature list

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


More information about the llvm-commits mailing list