ARM: fix folding stack adjustment (again again again...)
[oota-llvm.git] / lib / Target / ARM / ARMFrameLowering.cpp
index b52ca93c20452afdadae4b0b638d45f0a2b252fb..5b5b1b022f597df3da1b51ea328838f47e64be1d 100644 (file)
@@ -488,7 +488,8 @@ void ARMFrameLowering::emitPrologue(MachineFunction &MF,
 
   if (NumBytes) {
     // Adjust SP after all the callee-save spills.
-    if (tryFoldSPUpdateIntoPushPop(STI, MF, LastPush, NumBytes))
+    if (AFI->getNumAlignedDPRCS2Regs() == 0 &&
+        tryFoldSPUpdateIntoPushPop(STI, MF, LastPush, NumBytes))
       DefCFAOffsetCandidates.addExtraBytes(LastPush, NumBytes);
     else {
       emitSPUpdate(isARM, MBB, MBBI, dl, TII, -NumBytes,