[llvm-branch-commits] [llvm-branch] r204641 - Merging r199919:
Tom Stellard
thomas.stellard at amd.com
Mon Mar 24 11:21:31 PDT 2014
Author: tstellar
Date: Mon Mar 24 13:21:30 2014
New Revision: 204641
URL: http://llvm.org/viewvc/llvm-project?rev=204641&view=rev
Log:
Merging r199919:
------------------------------------------------------------------------
r199919 | thomas.stellard | 2014-01-23 10:49:34 -0800 (Thu, 23 Jan 2014) | 10 lines
R600: Remove successive JUMP in AnalyzeBranch when AllowModify is true
This fixes a crash in the OpenCV OpenCL test suite.
There is no lit test for this, because the test would be very large
and could easily be invalidated by changes to the scheduler
or other parts of the compiler.
Patch by: Vincent Lejeune
Modified:
llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp
Modified: llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp?rev=204641&r1=204640&r2=204641&view=diff
==============================================================================
--- llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp (original)
+++ llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp Mon Mar 24 13:21:30 2014
@@ -716,7 +716,13 @@ R600InstrInfo::AnalyzeBranch(MachineBasi
return false;
}
- // Get the last instruction in the block.
+ // Remove successive JUMP
+ while (I != MBB.begin() && llvm::prior(I)->getOpcode() == AMDGPU::JUMP) {
+ MachineBasicBlock::iterator PriorI = llvm::prior(I);
+ if (AllowModify)
+ I->removeFromParent();
+ I = PriorI;
+ }
MachineInstr *LastInst = I;
// If there is only one terminator instruction, process it.
More information about the llvm-branch-commits
mailing list