[llvm] [VPlan] Handle canonical VPWidenIntOrFpInduction in branch-condition simplification (PR #153539)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 02:00:04 PDT 2025
================
@@ -1498,10 +1498,21 @@ static bool simplifyBranchConditionForVFAndUF(VPlan &Plan, ElementCount BestVF,
// the region, otherwise replace the terminator controlling the latch with
// (BranchOnCond true).
auto *Header = cast<VPBasicBlock>(VectorRegion->getEntry());
- if (all_of(Header->phis(),
- IsaPred<VPCanonicalIVPHIRecipe, VPEVLBasedIVPHIRecipe,
- VPFirstOrderRecurrencePHIRecipe, VPPhi>)) {
+ if (all_of(Header->phis(), [](VPRecipeBase &Phi) {
+ if (auto *R = dyn_cast<VPWidenIntOrFpInductionRecipe>(&Phi))
+ return R->isCanonical();
----------------
arcbbb wrote:
Added.
https://github.com/llvm/llvm-project/pull/153539
More information about the llvm-commits
mailing list