aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/Verifier.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 3bfa5b4df0..ef76dff0ba 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -592,7 +592,8 @@ void Verifier::visitInstruction(Instruction &I) {
else if (OpBlock == BB) {
// If they are in the same basic block, make sure that the definition
// comes before the use.
- Assert2(DS->dominates(Op, &I),
+ Assert2(DS->dominates(Op, &I) ||
+ !DS->dominates(&BB->getParent()->getEntryBlock(), BB),
"Instruction does not dominate all uses!", Op, &I);
}