[llvm] [VPlan] Make canonical IV part of the region (PR #156262)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 14 14:25:15 PDT 2026
================
@@ -9138,13 +9132,14 @@ static SmallVector<Instruction *> preparePlanForEpilogueVectorLoop(
EPI.VectorTripCount = EPResumeVal->getOperand(0);
}
VPValue *VPV = Plan.getOrAddLiveIn(EPResumeVal);
+ VPValue *IV = VectorLoop->getCanonicalIV();
assert(all_of(IV->users(),
[](const VPUser *U) {
- return isa<VPScalarIVStepsRecipe>(U) ||
- isa<VPDerivedIVRecipe>(U) ||
- cast<VPRecipeBase>(U)->isScalarCast() ||
- cast<VPInstruction>(U)->getOpcode() ==
- Instruction::Add;
+ if (isa<VPScalarIVStepsRecipe>(U) || isa<VPDerivedIVRecipe>(U))
+ return true;
+ auto *R = cast<VPRecipeBase>(U);
+ return R->isScalarCast() ||
+ cast<VPInstruction>(R)->getOpcode() == Instruction::Add;
----------------
fhahn wrote:
Restored although still shows up as changed
https://github.com/llvm/llvm-project/pull/156262
More information about the llvm-commits
mailing list