[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 17 14:31:47 PDT 2004
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.272 -> 1.273
---
Log message:
Remove printout, realize that instructions in the entry block dominate all
other blocks.
---
Diffs of the changes: (+6 -6)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.272 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.273
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.272 Sun Oct 17 16:22:38 2004
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Oct 17 16:31:34 2004
@@ -3386,12 +3386,12 @@
if (Instruction *I = dyn_cast<Instruction>(V)) {
// We know that the instruction dominates the PHI if there are no undef
// values coming in.
- for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i)
- if (isa<UndefValue>(PN.getIncomingValue(i))) {
- std::cerr << "HAD TO DISABLE PHI ELIM IN IC!\n";
- V = 0;
- break;
- }
+ if (I->getParent() != &I->getParent()->getParent()->front())
+ for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i)
+ if (isa<UndefValue>(PN.getIncomingValue(i))) {
+ V = 0;
+ break;
+ }
}
if (V)
More information about the llvm-commits
mailing list