forked from OSchip/llvm-project
R600: Verify all instructions in the AsmPrinter on debug builds
Make a call to R600's implementation of verifyInstruction() to check that instructions are only using legal operands. llvm-svn: 202544
This commit is contained in:
parent
d61a1c3360
commit
9b9e926481
|
@ -69,6 +69,13 @@ void AMDGPUMCInstLower::lower(const MachineInstr *MI, MCInst &OutMI) const {
|
|||
void AMDGPUAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
AMDGPUMCInstLower MCInstLowering(OutContext);
|
||||
|
||||
#ifdef _DEBUG
|
||||
StringRef Err;
|
||||
if (!TM.getInstrInfo()->verifyInstruction(MI, Err)) {
|
||||
errs() << "Warning: Illegal instruction detected: " << Err << "\n";
|
||||
MI->dump();
|
||||
}
|
||||
#endif
|
||||
if (MI->isBundle()) {
|
||||
const MachineBasicBlock *MBB = MI->getParent();
|
||||
MachineBasicBlock::const_instr_iterator I = MI;
|
||||
|
|
Loading…
Reference in New Issue