OSDN Git Service

Load / store multiple instructions cannot load / store sp. Sorry, can't come up with...
authorEvan Cheng <evan.cheng@apple.com>
Fri, 12 Feb 2010 22:17:21 +0000 (22:17 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 12 Feb 2010 22:17:21 +0000 (22:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96023 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMLoadStoreOptimizer.cpp

index b78b95b..4e2d181 100644 (file)
@@ -350,7 +350,8 @@ ARMLoadStoreOpt::MergeLDR_STR(MachineBasicBlock &MBB, unsigned SIndex,
       : ARMRegisterInfo::getRegisterNumbering(Reg);
     // AM4 - register numbers in ascending order.
     // AM5 - consecutive register numbers in ascending order.
-    if (NewOffset == Offset + (int)Size &&
+    if (Reg != ARM::SP &&
+        NewOffset == Offset + (int)Size &&
         ((isAM4 && RegNum > PRegNum) || RegNum == PRegNum+1)) {
       Offset += Size;
       PRegNum = RegNum;