Skip to content

Commit 0119ce6

Browse files
Addressed comments
1 parent 5e96867 commit 0119ce6

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
@@ -8414,15 +8414,14 @@ void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
84148414
for (ElementCount VF = MinVF; ElementCount::isKnownLT(VF, MaxVFTimes2);) {
84158415
VFRange SubRange = {VF, MaxVFTimes2};
84168416
if (auto Plan = tryToBuildVPlanWithVPRecipes(SubRange)) {
8417-
bool IsScalarVPlan = Plan->hasVF(ElementCount::getFixed(1));
84188417
// Now optimize the initial VPlan.
8419-
if (!IsScalarVPlan)
8418+
if (!Plan->hasVF(ElementCount::getFixed(1)))
84208419
VPlanTransforms::truncateToMinimalBitwidths(
84218420
*Plan, CM.getMinimalBitwidths(), PSE.getSE()->getContext());
84228421
VPlanTransforms::optimize(*Plan, *PSE.getSE());
84238422
// TODO: try to put it close to addActiveLaneMask().
84248423
// Discard the plan if it is not EVL-compatible
8425-
if (!IsScalarVPlan && CM.foldTailWithEVL() &&
8424+
if (CM.foldTailWithEVL() &&
84268425
!VPlanTransforms::tryAddExplicitVectorLength(*Plan))
84278426
break;
84288427
assert(verifyVPlanIsValid(*Plan) && "VPlan is invalid");

0 commit comments

Comments
 (0)