Make sure to skip dbg_value instructions when finding an insertion point for
authorJim Grosbach <grosbach@apple.com>
Tue, 15 Jun 2010 00:41:09 +0000 (00:41 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 15 Jun 2010 00:41:09 +0000 (00:41 +0000)
the combined load/store instruction. rdar://7797940

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

lib/Target/ARM/ARMLoadStoreOptimizer.cpp

index ab69f1e365ff64f8c72ee9601a2a6f39165b12e2..2840e0e57da52680e31a011006fcdbddad82d1f6 100644 (file)
@@ -1491,7 +1491,8 @@ bool ARMPreAllocLoadStoreOpt::RescheduleOps(MachineBasicBlock *MBB,
       } else {
         // This is the new location for the loads / stores.
         MachineBasicBlock::iterator InsertPos = isLd ? FirstOp : LastOp;
-        while (InsertPos != MBB->end() && MemOps.count(InsertPos))
+        while (InsertPos != MBB->end()
+               && (MemOps.count(InsertPos) || InsertPos->isDebugValue()))
           ++InsertPos;
 
         // If we are moving a pair of loads / stores, see if it makes sense