[PrologEpilogInserter] Minor refactoring.
authorMaksim Panchenko <maks@fb.com>
Sat, 19 Sep 2015 04:42:15 +0000 (04:42 +0000)
committerMaksim Panchenko <maks@fb.com>
Sat, 19 Sep 2015 04:42:15 +0000 (04:42 +0000)
Differential Revision: http://reviews.llvm.org/D12924

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248084 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PrologEpilogInserter.cpp

index ed230ee4b89a90b16a8e5316e950e8ca83f8146b..6295d02a4ef085d08946033ab9df7354381349bd 100644 (file)
@@ -516,7 +516,7 @@ AdjustStackOffset(MachineFrameInfo *MFI, int FrameIdx,
   MaxAlign = std::max(MaxAlign, Align);
 
   // Adjust to alignment boundary.
-  Offset = (Offset + Align - 1) / Align * Align;
+  Offset = RoundUpToAlignment(Offset, Align);
 
   if (StackGrowsDown) {
     DEBUG(dbgs() << "alloc FI(" << FrameIdx << ") at SP[" << -Offset << "]\n");