[llvm-commits] [llvm] r105557 - /llvm/trunk/lib/Target/ARM/Thumb2ITBlockPass.cpp

Jim Grosbach grosbach at apple.com
Mon Jun 7 14:48:47 PDT 2010


Author: grosbach
Date: Mon Jun  7 16:48:47 2010
New Revision: 105557

URL: http://llvm.org/viewvc/llvm-project?rev=105557&view=rev
Log:
Handle dbg_value instructions (i.e., skip them) when generating IT blocks.
rdar://7797940

Modified:
    llvm/trunk/lib/Target/ARM/Thumb2ITBlockPass.cpp

Modified: llvm/trunk/lib/Target/ARM/Thumb2ITBlockPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb2ITBlockPass.cpp?rev=105557&r1=105556&r2=105557&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Thumb2ITBlockPass.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Thumb2ITBlockPass.cpp Mon Jun  7 16:48:47 2010
@@ -71,8 +71,10 @@
     unsigned Mask = 0, Pos = 3;
     // Branches, including tricky ones like LDM_RET, need to end an IT
     // block so check the instruction we just put in the block.
-    while (MBBI != E && Pos &&
-           (!MI->getDesc().isBranch() && !MI->getDesc().isReturn())) {
+    for (; MBBI != E && Pos &&
+           (!MI->getDesc().isBranch() && !MI->getDesc().isReturn()) ; ++MBBI) {
+      if (MBBI->isDebugValue())
+        continue;
       MachineInstr *NMI = &*MBBI;
       MI = NMI;
       DebugLoc ndl = NMI->getDebugLoc();
@@ -83,7 +85,6 @@
       else
         break;
       --Pos;
-      ++MBBI;
     }
     Mask |= (1 << Pos);
     // Tag along (firstcond[0] << 4) with the mask.





More information about the llvm-commits mailing list