mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Fix check. PHI nodes must be handled specially, of course.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -507,14 +507,15 @@ void Verifier::visitInstruction(Instruction &I) {
|
|||||||
|
|
||||||
else if (Instruction *Op = dyn_cast<Instruction>(I.getOperand(i))) {
|
else if (Instruction *Op = dyn_cast<Instruction>(I.getOperand(i))) {
|
||||||
BasicBlock *OpBlock = Op->getParent();
|
BasicBlock *OpBlock = Op->getParent();
|
||||||
// Invoke results are only usable in the normal destination, not in the
|
|
||||||
// exceptional destination.
|
|
||||||
if (InvokeInst *II = dyn_cast<InvokeInst>(Op))
|
|
||||||
OpBlock = II->getNormalDest();
|
|
||||||
|
|
||||||
// Check that a definition dominates all of its uses.
|
// Check that a definition dominates all of its uses.
|
||||||
//
|
//
|
||||||
if (!isa<PHINode>(I)) {
|
if (!isa<PHINode>(I)) {
|
||||||
|
// Invoke results are only usable in the normal destination, not in the
|
||||||
|
// exceptional destination.
|
||||||
|
if (InvokeInst *II = dyn_cast<InvokeInst>(Op))
|
||||||
|
OpBlock = II->getNormalDest();
|
||||||
|
|
||||||
// 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) ||
|
||||||
!DS->dominates(&BB->getParent()->getEntryBlock(), BB),
|
!DS->dominates(&BB->getParent()->getEntryBlock(), BB),
|
||||||
|
Reference in New Issue
Block a user