diff options
author | Guozhi Wei <carrot@google.com> | 2015-08-17 22:36:27 +0000 |
---|---|---|
committer | Guozhi Wei <carrot@google.com> | 2015-08-17 22:36:27 +0000 |
commit | f66d3844439e3cadf9b4234fd4af7b452b4a5f62 (patch) | |
tree | 0975518cd6f9936175bbadc9948406d6b9707fe3 /llvm/lib/Target/ARM/ARMFrameLowering.cpp | |
parent | 4e2d799cabdc6cd4d9e38e7594088f44ed952fba (diff) | |
download | llvm-f66d3844439e3cadf9b4234fd4af7b452b4a5f62.zip llvm-f66d3844439e3cadf9b4234fd4af7b452b4a5f62.tar.gz llvm-f66d3844439e3cadf9b4234fd4af7b452b4a5f62.tar.bz2 |
Align SP adjustment in function getSPAdjust
This commit adds a new function TargetFrameLowering::alignSPAdjust
and calls it from TargetInstrInfo::getSPAdjust. It fixes PR24142.
llvm-svn: 245253
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMFrameLowering.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp index 68f9385..0133232 100644 --- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp +++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp @@ -1734,8 +1734,7 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, // We need to keep the stack aligned properly. To do this, we round the // amount of space needed for the outgoing arguments up to the next // alignment boundary. - unsigned Align = getStackAlignment(); - Amount = (Amount+Align-1)/Align*Align; + Amount = alignSPAdjust(Amount); ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>(); assert(!AFI->isThumb1OnlyFunction() && |