diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-17 21:31:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-17 21:31:34 +0000 |
commit | ca45930548ed377fac6124c818c5efd80f1aab3e (patch) | |
tree | c5591b6a1be81ff6b027906f62c01893455f6c1d /lib | |
parent | 7e40f63428fbdf64fdea5aa84459d7b3072a9a65 (diff) | |
download | external_llvm-ca45930548ed377fac6124c818c5efd80f1aab3e.zip external_llvm-ca45930548ed377fac6124c818c5efd80f1aab3e.tar.gz external_llvm-ca45930548ed377fac6124c818c5efd80f1aab3e.tar.bz2 |
Remove printout, realize that instructions in the entry block dominate all
other blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 784e804..e3c45d4 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -3386,12 +3386,12 @@ Instruction *InstCombiner::visitPHINode(PHINode &PN) { 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) |