Skip to content

Commit a47195c

Browse files
Addressed comments
1 parent 1a73d5c commit a47195c

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
@@ -8465,15 +8465,14 @@ void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
84658465
for (ElementCount VF = MinVF; ElementCount::isKnownLT(VF, MaxVFTimes2);) {
84668466
VFRange SubRange = {VF, MaxVFTimes2};
84678467
if (auto Plan = tryToBuildVPlanWithVPRecipes(SubRange)) {
8468-
bool IsScalarVPlan = Plan->hasVF(ElementCount::getFixed(1));
84698468
// Now optimize the initial VPlan.
8470-
if (!IsScalarVPlan)
8469+
if (!Plan->hasVF(ElementCount::getFixed(1)))
84718470
VPlanTransforms::truncateToMinimalBitwidths(
84728471
*Plan, CM.getMinimalBitwidths(), PSE.getSE()->getContext());
84738472
VPlanTransforms::optimize(*Plan, *PSE.getSE());
84748473
// TODO: try to put it close to addActiveLaneMask().
84758474
// Discard the plan if it is not EVL-compatible
8476-
if (!IsScalarVPlan && CM.foldTailWithEVL() &&
8475+
if (CM.foldTailWithEVL() &&
84778476
!VPlanTransforms::tryAddExplicitVectorLength(*Plan))
84788477
break;
84798478
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
@@ -1415,9 +1415,6 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
14151415
for (VPBasicBlock *VPBB :
14161416
reverse(VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT))) {
14171417
for (VPRecipeBase &R : make_early_inc_range(reverse(*VPBB))) {
1418-
if (!properlyDominates(EVL.getDefiningRecipe(), &R, VPDT))
1419-
continue;
1420-
14211418
TypeSwitch<VPRecipeBase *>(&R)
14221419
.Case<VPWidenLoadRecipe>([&](VPWidenLoadRecipe *L) {
14231420
VPValue *NewMask =

0 commit comments

Comments
 (0)