1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00

My friend the invoke instruction does not dominate all basic blocks if it

occurs in the entry node of a function

llvm-svn: 17109
This commit is contained in:
Chris Lattner 2004-10-18 01:48:31 +00:00
parent f7bf129037
commit dbfa9a5e9c

View File

@ -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;