Skip to content

Commit 56d576a

Browse files
committed
!fixup address comments, thanks
1 parent 80a629c commit 56d576a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,9 @@ void VPlanTransforms::prepareForVectorization(
491491
cast<VPBasicBlock>(LatchVPB), InductionTy, IVDL);
492492

493493
[[maybe_unused]] bool HandledUncountableEarlyExit = false;
494+
// Handle the remaining early exits, either by converting the plan to one only
495+
// exiting via the latch or by disconnecting all early exiting edges and
496+
// requiring a scalar epilogue.
494497
for (VPIRBasicBlock *EB : Plan.getExitBlocks()) {
495498
for (VPBlockBase *Pred : to_vector(EB->getPredecessors())) {
496499
if (Pred == MiddleVPBB)

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,6 +2472,9 @@ void VPlanTransforms::handleUncountableEarlyExit(VPBasicBlock *EarlyExitingVPBB,
24722472
VPBlockBase *MiddleVPBB = LatchVPBB->getSuccessors()[0];
24732473
if (!EarlyExitVPBB->getSinglePredecessor() &&
24742474
EarlyExitVPBB->getPredecessors()[0] != MiddleVPBB) {
2475+
assert(EarlyExitVPBB->getNumPredecessors() == 2 &&
2476+
EarlyExitVPBB->getPredecessors()[1] == MiddleVPBB &&
2477+
"unsupported earl exit VPBB");
24752478
// Early exit operand should always be last phi operand. If EarlyExitVPBB
24762479
// has two predecessors and MiddleVPBB isn't the first, swap the operands of
24772480
// the phis.

0 commit comments

Comments
 (0)