diff options
author | Tim Northover <tnorthover@apple.com> | 2015-09-23 22:21:09 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2015-09-23 22:21:09 +0000 |
commit | beb5bccf88876eb3087674429ca71c4a6bee6b7d (patch) | |
tree | 4620219582699d73971c808cd4ef09acc297bea7 /llvm/lib/Target/ARM/ARMFrameLowering.cpp | |
parent | 6997525eaa8fa6ea09e6a8c7a33908e81544ef1f (diff) | |
download | llvm-beb5bccf88876eb3087674429ca71c4a6bee6b7d.zip llvm-beb5bccf88876eb3087674429ca71c4a6bee6b7d.tar.gz llvm-beb5bccf88876eb3087674429ca71c4a6bee6b7d.tar.bz2 |
ARM: fix folding stack adjustment (again again again...)
This time, the issue is that we weren't accounting for the possibility that
aligned DPRs could have been stored after the final "push" in a prologue. When
that happened we effectively moved a "sub sp, #N" from below the aligned stores
to above them, and everything went to pot.
To make it worse, I'd actually committed something testing that we produced
wrong code, so the test update is tiny.
llvm-svn: 248437
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMFrameLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp index b52ca93..5b5b1b0 100644 --- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp +++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp @@ -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, |