[llvm-branch-commits] [llvm-branch] r242453 - Merging r242410:
Hans Wennborg
hans at hanshq.net
Thu Jul 16 15:13:13 PDT 2015
Author: hans
Date: Thu Jul 16 17:13:13 2015
New Revision: 242453
URL: http://llvm.org/viewvc/llvm-project?rev=242453&view=rev
Log:
Merging r242410:
------------------------------------------------------------------------
r242410 | tstellar | 2015-07-16 08:38:29 -0700 (Thu, 16 Jul 2015) | 13 lines
AMDPGU/R600: Replace llvm_unreachable() call with LLVMContext::emitError()
Summary:
This fixes an issue on MIPS where the infinite-loop-evergreen.ll test
was failing to terminate.
Fixes PR24147.
Reviewers: arsenm, dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11260
------------------------------------------------------------------------
Modified:
llvm/branches/release_37/ (props changed)
llvm/branches/release_37/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
Propchange: llvm/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 16 17:13:13 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,242239,242288,242331,242341,242442
+/llvm/trunk:155241,242239,242288,242331,242341,242410,242442
Modified: llvm/branches/release_37/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp?rev=242453&r1=242452&r2=242453&view=diff
==============================================================================
--- llvm/branches/release_37/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp (original)
+++ llvm/branches/release_37/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp Thu Jul 16 17:13:13 2015
@@ -1732,18 +1732,9 @@ AMDGPUCFGStructurizer::normalizeInfinite
FuncRep->push_back(DummyExitBlk); //insert to function
SHOWNEWBLK(DummyExitBlk, "DummyExitBlock to normalize infiniteLoop: ");
DEBUG(dbgs() << "Old branch instr: " << *BranchMI << "\n";);
- MachineBasicBlock::iterator I = BranchMI;
- unsigned ImmReg = FuncRep->getRegInfo().createVirtualRegister(I32RC);
- llvm_unreachable("Extra register needed to handle CFG");
- MachineInstr *NewMI = insertInstrBefore(I, AMDGPU::BRANCH_COND_i32);
- MachineInstrBuilder MIB(*FuncRep, NewMI);
- MIB.addMBB(LoopHeader);
- MIB.addReg(ImmReg, false);
- SHOWNEWINSTR(NewMI);
- BranchMI->eraseFromParent();
- LoopLatch->addSuccessor(DummyExitBlk);
-
- return DummyExitBlk;
+ LLVMContext &Ctx = LoopHeader->getParent()->getFunction()->getContext();
+ Ctx.emitError("Extra register needed to handle CFG");
+ return nullptr;
}
void AMDGPUCFGStructurizer::removeUnconditionalBranch(MachineBasicBlock *MBB) {
More information about the llvm-branch-commits
mailing list