Load / store multiple was missing opportunites when the load / store bundles are...
authorEvan Cheng <evan.cheng@apple.com>
Thu, 22 Oct 2009 06:47:35 +0000 (06:47 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 22 Oct 2009 06:47:35 +0000 (06:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84842 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMLoadStoreOptimizer.cpp

index d2ec9ee6cdf9736d67008f1cf2272a1d5a3a0769..c9b9e84c2a3b68460608ec8cde472b3dfe15773d 100644 (file)
@@ -974,6 +974,9 @@ bool ARMLoadStoreOpt::LoadStoreMultipleOpti(MachineBasicBlock &MBB) {
     if (Advance) {
       ++Position;
       ++MBBI;
+      if (MBBI == E)
+        // Reach the end of the block, try merging the memory instructions.
+        TryMerge = true;
     } else
       TryMerge = true;