[PATCH] R600: Remove successive JUMP in AnalyzeBranch when AllowModify is true

Vincent Lejeune vljn at ovi.com
Tue Dec 3 10:10:52 PST 2013


http://llvm-reviews.chandlerc.com/D2322

Files:
  lib/Target/R600/R600InstrInfo.cpp

Index: lib/Target/R600/R600InstrInfo.cpp
===================================================================
--- lib/Target/R600/R600InstrInfo.cpp
+++ lib/Target/R600/R600InstrInfo.cpp
@@ -720,7 +720,13 @@
     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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2322.1.patch
Type: text/x-patch
Size: 619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131203/983b24ec/attachment.bin>


More information about the llvm-commits mailing list