1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

Add an assertion.

llvm-svn: 29199
This commit is contained in:
Owen Anderson 2006-07-19 05:48:45 +00:00
parent 7d68cbc39a
commit 3d84b9e0cc

View File

@ -272,6 +272,8 @@ bool LoopUnroll::visitLoop(Loop *L) {
// Remove LCSSA Phis from the exit block
for (BasicBlock::iterator ExitInstr = LoopExit->begin();
PHINode* PN = dyn_cast<PHINode>(ExitInstr); ++ExitInstr) {
assert(PN->getNumIncomingValues() == 1
&& "Block should only have one pred, so Phi's must be LCSSA");
PN->replaceAllUsesWith(PN->getOperand(0));
PN->eraseFromParent();
}