Skip to content

Commit dd1f74f

Browse files
Addressed comments
1 parent c055ee4 commit dd1f74f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8458,15 +8458,14 @@ void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
84588458
for (ElementCount VF = MinVF; ElementCount::isKnownLT(VF, MaxVFTimes2);) {
84598459
VFRange SubRange = {VF, MaxVFTimes2};
84608460
if (auto Plan = tryToBuildVPlanWithVPRecipes(SubRange)) {
8461-
bool IsScalarVPlan = Plan->hasVF(ElementCount::getFixed(1));
84628461
// Now optimize the initial VPlan.
8463-
if (!IsScalarVPlan)
8462+
if (!Plan->hasVF(ElementCount::getFixed(1)))
84648463
VPlanTransforms::truncateToMinimalBitwidths(
84658464
*Plan, CM.getMinimalBitwidths(), PSE.getSE()->getContext());
84668465
VPlanTransforms::optimize(*Plan, *PSE.getSE());
84678466
// TODO: try to put it close to addActiveLaneMask().
84688467
// Discard the plan if it is not EVL-compatible
8469-
if (!IsScalarVPlan && CM.foldTailWithEVL() &&
8468+
if (CM.foldTailWithEVL() &&
84708469
!VPlanTransforms::tryAddExplicitVectorLength(*Plan))
84718470
break;
84728471
assert(verifyVPlanIsValid(*Plan) && "VPlan is invalid");

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,9 +1394,6 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
13941394
for (VPBasicBlock *VPBB :
13951395
reverse(VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT))) {
13961396
for (VPRecipeBase &R : make_early_inc_range(reverse(*VPBB))) {
1397-
if (!properlyDominates(EVL.getDefiningRecipe(), &R, VPDT))
1398-
continue;
1399-
14001397
TypeSwitch<VPRecipeBase *>(&R)
14011398
.Case<VPWidenLoadRecipe>([&](VPWidenLoadRecipe *L) {
14021399
VPValue *NewMask =

0 commit comments

Comments
 (0)