forked from OSchip/llvm-project
Verify that phi instructions refer to MBBs in the CFG.
The machine code verifier no longer tolerates phi instructions with noop operands. All MBBs on a phi instruction must be in the CFG. llvm-svn: 82448
This commit is contained in:
parent
4d8af2f1ae
commit
f6eb7d83d1
|
@ -592,13 +592,14 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum)
|
|||
}
|
||||
break;
|
||||
}
|
||||
// Can PHI instrs refer to MBBs not in the CFG? X86 and ARM do.
|
||||
// case MachineOperand::MO_MachineBasicBlock:
|
||||
// if (MI->getOpcode() == TargetInstrInfo::PHI) {
|
||||
// if (!MO->getMBB()->isSuccessor(MI->getParent()))
|
||||
// report("PHI operand is not in the CFG", MO, MONum);
|
||||
// }
|
||||
// break;
|
||||
|
||||
case MachineOperand::MO_MachineBasicBlock:
|
||||
if (MI->getOpcode() == TargetInstrInfo::PHI) {
|
||||
if (!MO->getMBB()->isSuccessor(MI->getParent()))
|
||||
report("PHI operand is not in the CFG", MO, MONum);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue