Skip to content

Commit 686adb2

Browse files
committed
Address review comment
1 parent 7dae35d commit 686adb2

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7553,7 +7553,9 @@ VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
75537553
CM.CostKind);
75547554
precomputeCosts(BestPlan, BestFactor.Width, CostCtx);
75557555
assert((BestFactor.Width == LegacyVF.Width ||
7556-
BestPlan.hasRegionWithEarlyExit() ||
7556+
(BestPlan.getVectorLoopRegion() &&
7557+
BestPlan.getVectorLoopRegion()->getSingleSuccessor() !=
7558+
BestPlan.getMiddleBlock()) ||
75577559
planContainsAdditionalSimplifications(getPlanFor(BestFactor.Width),
75587560
CostCtx, OrigLoop) ||
75597561
planContainsAdditionalSimplifications(getPlanFor(LegacyVF.Width),

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3623,15 +3623,6 @@ class VPlan {
36233623
/// of VPBlockShallowTraversalWrapper.
36243624
auto getExitBlocks();
36253625

3626-
/// Returns true if the plan has a region containing an early exit, i.e. the
3627-
/// loop exits due to a condition other than testing the canonical induction
3628-
/// variable against the trip count.
3629-
bool hasRegionWithEarlyExit() {
3630-
auto *VectorRegion = getVectorLoopRegion();
3631-
return VectorRegion &&
3632-
VectorRegion->getSingleSuccessor() != getMiddleBlock();
3633-
}
3634-
36353626
/// Returns true if \p VPBB is an exit block.
36363627
bool isExitBlock(VPBlockBase *VPBB);
36373628

0 commit comments

Comments
 (0)