Skip to content

Commit 17b4be8

Browse files
committed
[VPlan] Move setting name and adding VFs after recipe creation.(NFC)
Recipe creation is the only place where the VF range is restricted. Move setting the VFs just after initial recipe creation.
1 parent e0223fa commit 17b4be8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9494,6 +9494,10 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
94949494
"entry block must be set to a VPRegionBlock having a non-empty entry "
94959495
"VPBasicBlock");
94969496

9497+
for (ElementCount VF : Range)
9498+
Plan->addVF(VF);
9499+
Plan->setName("Initial VPlan");
9500+
94979501
// Update wide induction increments to use the same step as the corresponding
94989502
// wide induction. This enables detecting induction increments directly in
94999503
// VPlan and removes redundant splats.
@@ -9536,10 +9540,6 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
95369540
InterleaveGroups, RecipeBuilder,
95379541
CM.isScalarEpilogueAllowed());
95389542

9539-
for (ElementCount VF : Range)
9540-
Plan->addVF(VF);
9541-
Plan->setName("Initial VPlan");
9542-
95439543
// Replace VPValues for known constant strides guaranteed by predicate scalar
95449544
// evolution.
95459545
auto CanUseVersionedStride = [&Plan](VPUser &U, unsigned) {

0 commit comments

Comments
 (0)