From: Maksim Panchenko Date: Sat, 19 Sep 2015 04:42:15 +0000 (+0000) Subject: [PrologEpilogInserter] Minor refactoring. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4e9ce340e60c6cd60186df520959a8685b177550;p=oota-llvm.git [PrologEpilogInserter] Minor refactoring. Differential Revision: http://reviews.llvm.org/D12924 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248084 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index ed230ee4b89..6295d02a4ef 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -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");