diff options
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 | 
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; | 

