Make a call to R600's implementation of verifyInstruction() to check that instructions are only using legal operands. --- lib/Target/R600/AMDGPUMCInstLower.cpp | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/lib/Target/R600/AMDGPUMCInstLower.cpp b/lib/Target/R600/AMDGPUMCInstLower.cpp index 4af535c..d6a7fb0 100644 --- a/lib/Target/R600/AMDGPUMCInstLower.cpp +++ b/lib/Target/R600/AMDGPUMCInstLower.cpp @@ -69,6 +69,14 @@ 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() << "Illegal instruction detected: " << Err << "\n"; + MI->dump(); + errs() << "Please file a bug a bugs.freedesktop.org\n"; + } +#endif if (MI->isBundle()) { const MachineBasicBlock *MBB = MI->getParent(); MachineBasicBlock::const_instr_iterator I = MI; -- 1.8.1.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev