[llvm] [AMDGPU][True16][CodeGen] add a 16bit d16 predicate for true16 mode (PR #156574)
Joe Nash via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 13:58:55 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)>;
+
----------------
Sisyph wrote:
Thanks, this approach looks pretty clean.
https://github.com/llvm/llvm-project/pull/156574
More information about the llvm-commits
mailing list