[llvm] [VPlan] Run removeDeadRecipes early. (PR #190191)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri May 1 03:16:06 PDT 2026
================
@@ -8182,6 +8183,10 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(
Range);
}
+ // Ensure scalar VF plans only contain VF=1, as required by hasScalarVFOnly.
+ if (Range.Start.isScalar())
+ Range.End = Range.Start * 2;
----------------
fhahn wrote:
The changes in the patch should not lead to empty ranges.
Previously the dead induction increments would always get widening for non-scalar VFs, so that guaranteed splitting the ranges, so that the initial range would only contain the scalar VF. Now with those removed, we need to ensure this ourselves, by forcing the split for the scalar VF by setting Start = 1, End = 2
https://github.com/llvm/llvm-project/pull/190191
More information about the llvm-commits
mailing list