[llvm] [VPlan] Move addExplicitVectorLength to tryToBuildVPlanWithVPRecipes (PR #166164)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 05:11:25 PST 2025


================
@@ -610,9 +610,11 @@ createScalarIVSteps(VPlan &Plan, InductionDescriptor::InductionKind Kind,
                     VPBuilder &Builder) {
   VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion();
   VPBasicBlock *HeaderVPBB = LoopRegion->getEntryBasicBlock();
-  VPCanonicalIVPHIRecipe *CanonicalIV = LoopRegion->getCanonicalIV();
-  VPSingleDefRecipe *BaseIV = Builder.createDerivedIV(
-      Kind, FPBinOp, StartV, CanonicalIV, Step, "offset.idx");
+  VPValue *IV = LoopRegion->getCanonicalIV();
+  if (auto *EVLIV = LoopRegion->getEVLBasedIV())
+    IV = EVLIV;
----------------
fhahn wrote:

Hmm, so now potentially more transformations need to handle EVL based IVs?

https://github.com/llvm/llvm-project/pull/166164


More information about the llvm-commits mailing list