[llvm] [AArch64] Hint regalloc to choose distinct predicate for MATCH/CMP (PR #190139)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 09:29:51 PDT 2026
================
@@ -911,6 +911,18 @@ def FeatureDisableFastIncVL : SubtargetFeature<"disable-fast-inc-vl",
"HasDisableFastIncVL", "true",
"Do not prefer INC/DEC, ALL, { 1, 2, 4 } over ADDVL">;
+// For some cores it is preferable to choose a destination predicate register
+// that does not match the governing predicate, for example integer compares
+// and logical predicate instructions.
+// While the algorithm avoids introducing callee-save spill/fills and therefore
+// shouldn't have any adverse affects on cores where using distinct registers is
+// not necessarily preferable, we still provide a way to turn the feature off.
+def FeatureDisableDistinctPredicateDstReg : SubtargetFeature<
+ "disable-distinct-predicate-dst-reg", "UseDistinctPredicateDstReg",
+ "false",
+ "Disabling selecting a distinct predicate register for the destination "
+ "operand of instructions that take a governing predicate">;
----------------
paulwalker-arm wrote:
~At of interest given you are only applying a hint, what's a realistic scenario where you'd want to disable the feature?~
Asked offline. For completeness, the hope is to remove this option once we're confident there's no reason to disable it.
https://github.com/llvm/llvm-project/pull/190139
More information about the llvm-commits
mailing list