Skip to content

Commit b5405c1

Browse files
committed
!fixup adjust check and message.
1 parent 44537d9 commit b5405c1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7201,7 +7201,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
72017201
return OptimizationRemarkAnalysis(DEBUG_TYPE, "VectorizationDead",
72027202
OrigLoop->getStartLoc(),
72037203
OrigLoop->getHeader())
7204-
<< "Created vector loop never executes due insufficient trip "
7204+
<< "Created vector loop never executes due to insufficient trip "
72057205
"count.";
72067206
});
72077207
return DenseMap<const SCEV *, Value *>();

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,13 +2216,12 @@ void VPlanTransforms::removeBranchOnConst(VPlan &Plan) {
22162216
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
22172217
vp_depth_first_shallow(Plan.getEntry()))) {
22182218
VPValue *Cond;
2219-
// Skip blocks that don't have 2 successors or are not terminated by
2220-
// BranchOnCond. Empty blocks with 2 successors are also skipped; their
2221-
// branch condition will be added later.
2222-
if (VPBB->getNumSuccessors() != 2 || VPBB->empty() ||
2223-
!match(&VPBB->back(), m_BranchOnCond(m_VPValue(Cond))))
2219+
// Skip blocks that are not terminated by BranchOnCond.
2220+
if (VPBB->empty() || !match(&VPBB->back(), m_BranchOnCond(m_VPValue(Cond))))
22242221
continue;
22252222

2223+
assert(VPBB->getNumSuccessors() == 2 &&
2224+
"Two successors expected for BranchOnCond");
22262225
unsigned RemovedIdx;
22272226
if (match(Cond, m_True()))
22282227
RemovedIdx = 1;

0 commit comments

Comments
 (0)