]> granicus.if.org Git - llvm/commitdiff
AMDGPU: Add m0 vgpr load loop block as successor
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 30 Jun 2016 20:49:28 +0000 (20:49 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 30 Jun 2016 20:49:28 +0000 (20:49 +0000)
This shows up as a verifier error when I move this
earlier, not sure why it didn't before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274275 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SILowerControlFlow.cpp

index 861aa83888d914cb022286b44d2998eef637274f..ae23a96b621b22a653cf46b06fd28723ffac7f5d 100644 (file)
@@ -521,6 +521,7 @@ bool SILowerControlFlow::loadM0(MachineInstr &MI, MachineInstr *MovRel, int Offs
   // Move the rest of the block into a new block.
   RemainderBB->transferSuccessors(&MBB);
   RemainderBB->splice(RemainderBB->begin(), &MBB, I, MBB.end());
+  MBB.addSuccessor(LoopBB);
 
   emitLoadM0FromVGPRLoop(*LoopBB, DL, MovRel, *Idx, Offset);