llvm.org GIT mirror llvm / ff1afeb
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@204641 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 6 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
715715 return false;
716716 }
717717
718 // Get the last instruction in the block.
718 // Remove successive JUMP
719 while (I != MBB.begin() && llvm::prior(I)->getOpcode() == AMDGPU::JUMP) {
720 MachineBasicBlock::iterator PriorI = llvm::prior(I);
721 if (AllowModify)
722 I->removeFromParent();
723 I = PriorI;
724 }
719725 MachineInstr *LastInst = I;
720726
721727 // If there is only one terminator instruction, process it.