Make LoopUnroll not die on LCSSA Phis. This makes lencod work again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2006-07-19 05:45:14 +00:00
parent db5b9cfd86
commit 2698a08c23

View File

@ -269,6 +269,12 @@ bool LoopUnroll::visitLoop(Loop *L) {
// FIXME: Should update dominator analyses
// Remove LCSSA Phis from the exit block
for (BasicBlock::iterator ExitInstr = LoopExit->begin();
PHINode* PN = dyn_cast<PHINode>(ExitInstr); ++ExitInstr) {
PN->replaceAllUsesWith(PN->getOperand(0));
PN->eraseFromParent();
}
// Now that everything is up-to-date that will be, we fold the loop block into
// the preheader and exit block, updating our analyses as we go.