summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-18 01:48:31 +0000
committerChris Lattner <sabre@nondot.org>2004-10-18 01:48:31 +0000
commit3b92f171658b879c9cd531eebdd0bed2b8de8fd7 (patch)
treee403b2364896d70a2c7a6be131bf9d97a0dfab14 /llvm/lib/Transforms
parent34ae67070664d9100ee4706f16bb3a6872dc05bd (diff)
downloadbcm5719-llvm-3b92f171658b879c9cd531eebdd0bed2b8de8fd7.tar.gz
bcm5719-llvm-3b92f171658b879c9cd531eebdd0bed2b8de8fd7.zip
My friend the invoke instruction does not dominate all basic blocks if it
occurs in the entry node of a function llvm-svn: 17109
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index e3c45d40fb2..f8373cb6e26 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -3386,7 +3386,8 @@ 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.
- if (I->getParent() != &I->getParent()->getParent()->front())
+ if (I->getParent() != &I->getParent()->getParent()->front() ||
+ isa<InvokeInst>(I))
for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i)
if (isa<UndefValue>(PN.getIncomingValue(i))) {
V = 0;
OpenPOWER on IntegriCloud