Skip to content

Commit 06d4876

Browse files
committed
[VPlan] Replace checking IR loop with checking VPlan predecessors (NFC).
Update check to use VPEarlyExitBlock's predecessors, which removes a dependence on underlying IR and is more in line with the comment below.
1 parent dde00f5 commit 06d4876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,7 @@ void VPlanTransforms::handleUncountableEarlyExit(
25082508
// Early exit operand should always be last, i.e., 0 if VPEarlyExitBlock has
25092509
// a single predecessor and 1 if it has two.
25102510
unsigned EarlyExitIdx = ExitIRI->getNumOperands() - 1;
2511-
if (OrigLoop->getUniqueExitBlock()) {
2511+
if (!VPEarlyExitBlock->getSinglePredecessor()) {
25122512
// If VPEarlyExitBlock has two predecessors, they are already ordered such
25132513
// that early exit is second (and latch exit is first), by construction.
25142514
// But its underlying IRBB (EarlyExitIRBB) may have its predecessors

0 commit comments

Comments
 (0)