diff options
author | Eric Christopher <echristo@apple.com> | 2011-06-09 00:15:19 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-06-09 00:15:19 +0000 |
commit | efe12907dd58d1d34ab10b0bd2ae9a099b996f53 (patch) | |
tree | 17de543ba5cd0d6162ee6b9ff0c6244f023b1453 /lib/CodeGen/CallingConvLower.cpp | |
parent | 471e4224809f51652c71f319532697a879a75a0d (diff) |
If the alignment of the byval argument is greater than the alignment
of the frame then increase the maximum alignment of the frame to
match.
Fixes PR6965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CallingConvLower.cpp')
-rw-r--r-- | lib/CodeGen/CallingConvLower.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CallingConvLower.cpp b/lib/CodeGen/CallingConvLower.cpp index dac2fef5b4..bc61ec8ed0 100644 --- a/lib/CodeGen/CallingConvLower.cpp +++ b/lib/CodeGen/CallingConvLower.cpp @@ -49,6 +49,8 @@ void CCState::HandleByVal(unsigned ValNo, MVT ValVT, Size = MinSize; if (MinAlign > (int)Align) Align = MinAlign; + if (MF.getFrameInfo()->getMaxAlignment() < Align) + MF.getFrameInfo()->setMaxAlignment(Align); TM.getTargetLowering()->HandleByVal(const_cast<CCState*>(this), Size); unsigned Offset = AllocateStack(Size, Align); addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo)); |