[llvm-branch-commits] [llvm-branch] r271724 - Merging r263627:
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jun 3 13:22:47 PDT 2016
Author: tstellar
Date: Fri Jun 3 15:22:47 2016
New Revision: 271724
URL: http://llvm.org/viewvc/llvm-project?rev=271724&view=rev
Log:
Merging r263627:
------------------------------------------------------------------------
r263627 | michel.daenzer | 2016-03-16 02:10:42 -0700 (Wed, 16 Mar 2016) | 11 lines
AMDGPU: Verify instructions in non-debug builds as well
And emit an error if it fails.
This prevents illegal instructions from getting sent to the GPU, which
would potentially result in a hang.
This is a candidate for the stable branch(es).
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
------------------------------------------------------------------------
Modified:
llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
Modified: llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp?rev=271724&r1=271723&r2=271724&view=diff
==============================================================================
--- llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp (original)
+++ llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp Fri Jun 3 15:22:47 2016
@@ -88,13 +88,13 @@ void AMDGPUAsmPrinter::EmitInstruction(c
const AMDGPUSubtarget &STI = MF->getSubtarget<AMDGPUSubtarget>();
AMDGPUMCInstLower MCInstLowering(OutContext, STI);
-#ifdef _DEBUG
StringRef Err;
if (!STI.getInstrInfo()->verifyInstruction(MI, Err)) {
- errs() << "Warning: Illegal instruction detected: " << Err << "\n";
+ LLVMContext &C = MI->getParent()->getParent()->getFunction()->getContext();
+ C.emitError("Illegal instruction detected: " + Err);
MI->dump();
}
-#endif
+
if (MI->isBundle()) {
const MachineBasicBlock *MBB = MI->getParent();
MachineBasicBlock::const_instr_iterator I = ++MI->getIterator();
More information about the llvm-branch-commits
mailing list