Skip to content

Commit 581bccd

Browse files
Addressed comments
1 parent 215b55b commit 581bccd

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
@@ -8637,15 +8637,14 @@ void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
86378637
for (ElementCount VF = MinVF; ElementCount::isKnownLT(VF, MaxVFTimes2);) {
86388638
VFRange SubRange = {VF, MaxVFTimes2};
86398639
if (auto Plan = tryToBuildVPlanWithVPRecipes(SubRange)) {
8640-
bool IsScalarVPlan = Plan->hasVF(ElementCount::getFixed(1));
86418640
// Now optimize the initial VPlan.
8642-
if (!IsScalarVPlan)
8641+
if (!Plan->hasVF(ElementCount::getFixed(1)))
86438642
VPlanTransforms::truncateToMinimalBitwidths(
86448643
*Plan, CM.getMinimalBitwidths(), PSE.getSE()->getContext());
86458644
VPlanTransforms::optimize(*Plan, *PSE.getSE());
86468645
// TODO: try to put it close to addActiveLaneMask().
86478646
// Discard the plan if it is not EVL-compatible
8648-
if (!IsScalarVPlan && CM.foldTailWithEVL() &&
8647+
if (CM.foldTailWithEVL() &&
86498648
!VPlanTransforms::tryAddExplicitVectorLength(*Plan))
86508649
break;
86518650
assert(verifyVPlanIsValid(*Plan) && "VPlan is invalid");

0 commit comments

Comments
 (0)