aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-05 01:03:27 +0000
committerChris Lattner <sabre@nondot.org>2005-08-05 01:03:27 +0000
commit8313a25d27ceb47759b64aa9a48b5cb04aaf9e6f (patch)
tree11cfb0ccccee09cc7f293cdfe1b12c4c5de01671 /lib/VMCore
parent1325b42a7dc38e99e1aa3531395d1678b31d3c55 (diff)
downloadexternal_llvm-8313a25d27ceb47759b64aa9a48b5cb04aaf9e6f.zip
external_llvm-8313a25d27ceb47759b64aa9a48b5cb04aaf9e6f.tar.gz
external_llvm-8313a25d27ceb47759b64aa9a48b5cb04aaf9e6f.tar.bz2
Invoke instructions do not dominate all successors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22671 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Instructions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index efeb2c3..d9c2087 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -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.