projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf3d2e2
)
Make sure to check for a very bad class of errors: an instruction
author
Chris Lattner
<sabre@nondot.org>
Fri, 16 Apr 2004 05:51:47 +0000
(
05:51
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 16 Apr 2004 05:51:47 +0000
(
05:51
+0000)
that does not dominate all of its users, but is in the same basic block as
its users. This class of error is what caused the mysterious CBE only
failures last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12979
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Verifier.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Verifier.cpp
b/lib/VMCore/Verifier.cpp
index ffe2c5a5486bd83a2d075785c5f8ad787083623c..edd3da1a0075f917f9b2b931dceb4e1801e05e75 100644
(file)
--- a/
lib/VMCore/Verifier.cpp
+++ b/
lib/VMCore/Verifier.cpp
@@
-559,6
+559,12
@@
void Verifier::visitInstruction(Instruction &I) {
// exceptional destination.
if (InvokeInst *II = dyn_cast<InvokeInst>(Op))
OpBlock = II->getNormalDest();
+ 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),
+ "Instruction does not dominate all uses!", Op, &I);
+ }
// Definition must dominate use unless use is unreachable!
Assert2(DS->dominates(OpBlock, BB) ||