Skip to content

Commit f565655

Browse files
Addressed comments
1 parent 3b2b9c9 commit f565655

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8406,15 +8406,14 @@ void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
84068406
for (ElementCount VF = MinVF; ElementCount::isKnownLT(VF, MaxVFTimes2);) {
84078407
VFRange SubRange = {VF, MaxVFTimes2};
84088408
if (auto Plan = tryToBuildVPlanWithVPRecipes(SubRange)) {
8409-
bool IsScalarVPlan = Plan->hasVF(ElementCount::getFixed(1));
84108409
// Now optimize the initial VPlan.
8411-
if (!IsScalarVPlan)
8410+
if (!Plan->hasVF(ElementCount::getFixed(1)))
84128411
VPlanTransforms::truncateToMinimalBitwidths(
84138412
*Plan, CM.getMinimalBitwidths(), PSE.getSE()->getContext());
84148413
VPlanTransforms::optimize(*Plan, *PSE.getSE());
84158414
// TODO: try to put it close to addActiveLaneMask().
84168415
// Discard the plan if it is not EVL-compatible
8417-
if (!IsScalarVPlan && CM.foldTailWithEVL() &&
8416+
if (CM.foldTailWithEVL() &&
84188417
!VPlanTransforms::tryAddExplicitVectorLength(*Plan))
84198418
break;
84208419
assert(verifyVPlanIsValid(*Plan) && "VPlan is invalid");

0 commit comments

Comments
 (0)