[llvm] [VPlan] Chose between FOR and predicated IV in createHeaderPhiRecipes. (PR #201208)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 10 03:11:59 PDT 2026
================
@@ -875,18 +876,20 @@ bool LoopVectorizationLegality::canVectorizeInstr(Instruction &I) {
return true;
}
- if (RecurrenceDescriptor::isFixedOrderRecurrence(Phi, TheLoop, DT)) {
+ bool IsFOR = RecurrenceDescriptor::isFixedOrderRecurrence(Phi, TheLoop, DT);
+ if (IsFOR)
FixedOrderRecurrences.insert(Phi);
- return true;
- }
// As a last resort, coerce the PHI to a AddRec expression
// and re-try classifying it a an induction PHI.
- if (InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID, true) &&
- !IsDisallowedStridedPointerInduction(ID)) {
+ bool IsPredIV =
+ InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID, true) &&
+ !IsDisallowedStridedPointerInduction(ID);
----------------
artagnon wrote:
Could introduce InductionDescriptor::isPredicatedInduction for clarity?
https://github.com/llvm/llvm-project/pull/201208
More information about the llvm-commits
mailing list