mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-01 07:11:45 +00:00
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 llvm-svn: 199919
This commit is contained in:
parent
e8c59f575b
commit
58d7c4cc96
@ -716,7 +716,13 @@ R600InstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user