forked from OSchip/llvm-project
Make sure to check for a very bad class of errors: an instruction
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. llvm-svn: 12979
This commit is contained in:
parent
82876bdb2a
commit
0377e4384f
|
@ -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) ||
|
||||
|
|
Loading…
Reference in New Issue