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 | 11edab6a4667f5c3900bc3000b87a5a1eb3dd938 (patch) | |
tree | 31916d20600ac83c12eaf27c97dbe4fefa579363 /llvm/lib/CodeGen/CallingConvLower.cpp | |
parent | 0713a9d8fc41cd24d73141dc5e34cd64ff14ac6e (diff) | |
download | bcm5719-llvm-11edab6a4667f5c3900bc3000b87a5a1eb3dd938.tar.gz bcm5719-llvm-11edab6a4667f5c3900bc3000b87a5a1eb3dd938.zip |
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
llvm-svn: 132764
Diffstat (limited to 'llvm/lib/CodeGen/CallingConvLower.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CallingConvLower.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CallingConvLower.cpp b/llvm/lib/CodeGen/CallingConvLower.cpp index dac2fef5b43..bc61ec8ed0a 100644 --- a/llvm/lib/CodeGen/CallingConvLower.cpp +++ b/llvm/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)); |