Fix PR361.

Dominance properties don't hold in unreachable code

llvm-svn: 14053
This commit is contained in:
Chris Lattner 2004-06-07 23:07:33 +00:00
parent 3b2e067386
commit 71dbebf411
1 changed files with 2 additions and 1 deletions

View File

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