Don't call dominates on unreachable instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2012-02-26 02:14:25 +00:00
parent f7087ea508
commit 8691216d91

View File

@ -1648,8 +1648,8 @@ void Verifier::visitInstruction(Instruction &I) {
}
// Definition must dominate use unless use is unreachable!
Assert2(InstsInThisBlock.count(Op) || DT->dominates(Op, &I) ||
!DT->isReachableFromEntry(BB),
Assert2(InstsInThisBlock.count(Op) || !DT->isReachableFromEntry(BB)
|| DT->dominates(Op, &I),
"Instruction does not dominate all uses!", Op, &I);
}
} else if (isa<InlineAsm>(I.getOperand(i))) {