mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 20:59:51 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9f0d68f522
commit
34faf78241
@ -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
Block a user