From 8313a25d27ceb47759b64aa9a48b5cb04aaf9e6f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 5 Aug 2005 01:03:27 +0000 Subject: [PATCH] Invoke instructions do not dominate all successors git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22671 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Instructions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index efeb2c3766f..d9c20872f88 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(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(IV)) return 0; // Cannot guarantee that InVal dominates this PHINode. // All of the incoming values are the same, return the value now. -- 2.34.1