Skip to content

Commit 7915cae

Browse files
Addressed comments
1 parent e95d6b0 commit 7915cae

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
@@ -8485,15 +8485,14 @@ void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
84858485
for (ElementCount VF = MinVF; ElementCount::isKnownLT(VF, MaxVFTimes2);) {
84868486
VFRange SubRange = {VF, MaxVFTimes2};
84878487
if (auto Plan = tryToBuildVPlanWithVPRecipes(SubRange)) {
8488-
bool IsScalarVPlan = Plan->hasVF(ElementCount::getFixed(1));
84898488
// Now optimize the initial VPlan.
8490-
if (!IsScalarVPlan)
8489+
if (!Plan->hasVF(ElementCount::getFixed(1)))
84918490
VPlanTransforms::truncateToMinimalBitwidths(
84928491
*Plan, CM.getMinimalBitwidths(), PSE.getSE()->getContext());
84938492
VPlanTransforms::optimize(*Plan, *PSE.getSE());
84948493
// TODO: try to put it close to addActiveLaneMask().
84958494
// Discard the plan if it is not EVL-compatible
8496-
if (!IsScalarVPlan && CM.foldTailWithEVL() &&
8495+
if (CM.foldTailWithEVL() &&
84978496
!VPlanTransforms::tryAddExplicitVectorLength(*Plan))
84988497
break;
84998498
assert(verifyVPlanIsValid(*Plan) && "VPlan is invalid");

0 commit comments

Comments
 (0)