Skip to content

Commit 620a515

Browse files
committedFeb 17, 2025
[VPlan] Add message to assert in HCFGBuilder (NFC).
Suggested in #126388.
1 parent a92bfaa commit 620a515

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ void PlainCFGBuilder::fixPhiNodes() {
134134
if (isHeaderBB(Phi->getParent(), L)) {
135135
// For header phis, make sure the incoming value from the loop
136136
// predecessor is the first operand of the recipe.
137-
assert(Phi->getNumOperands() == 2);
137+
assert(Phi->getNumOperands() == 2 &&
138+
"header phi must have exactly 2 operands");
138139
BasicBlock *LoopPred = L->getLoopPredecessor();
139140
VPPhi->addOperand(
140141
getOrCreateVPOperand(Phi->getIncomingValueForBlock(LoopPred)));

0 commit comments

Comments
 (0)