[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnroll.cpp
Owen Anderson
resistor at mac.com
Tue Jul 18 22:48:57 PDT 2006
Changes in directory llvm/lib/Transforms/Scalar:
LoopUnroll.cpp updated: 1.21 -> 1.22
---
Log message:
Add an assertion.
---
Diffs of the changes: (+2 -0)
LoopUnroll.cpp | 2 ++
1 files changed, 2 insertions(+)
Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp
diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.21 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.22
--- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.21 Wed Jul 19 00:45:14 2006
+++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp Wed Jul 19 00:48:45 2006
@@ -272,6 +272,8 @@
// 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();
}
More information about the llvm-commits
mailing list