1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

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:
Chris Lattner 2004-04-16 05:51:47 +00:00
parent 8f8bd7daac
commit 644ad23b21

View File

@ -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) ||