mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +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:
parent
8f8bd7daac
commit
644ad23b21
@ -559,6 +559,12 @@ void Verifier::visitInstruction(Instruction &I) {
|
|||||||
// exceptional destination.
|
// exceptional destination.
|
||||||
if (InvokeInst *II = dyn_cast<InvokeInst>(Op))
|
if (InvokeInst *II = dyn_cast<InvokeInst>(Op))
|
||||||
OpBlock = II->getNormalDest();
|
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!
|
// Definition must dominate use unless use is unreachable!
|
||||||
Assert2(DS->dominates(OpBlock, BB) ||
|
Assert2(DS->dominates(OpBlock, BB) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user