Invoke instructions do not dominate all successors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-08-05 01:03:27 +00:00
parent 1325b42a7d
commit 8313a25d27

View File

@@ -167,7 +167,8 @@ Value *PHINode::hasConstantValue(bool AllowNonDominatingInstruction) const {
if (HasUndefInput && !AllowNonDominatingInstruction)
if (Instruction *IV = dyn_cast<Instruction>(InVal))
// If it's in the entry block, it dominates everything.
if (IV->getParent() != &IV->getParent()->getParent()->front())
if (IV->getParent() != &IV->getParent()->getParent()->front() ||
isa<InvokeInst>(IV))
return 0; // Cannot guarantee that InVal dominates this PHINode.
// All of the incoming values are the same, return the value now.