summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CallingConvLower.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-06-09 00:15:19 +0000
committerEric Christopher <echristo@apple.com>2011-06-09 00:15:19 +0000
commit11edab6a4667f5c3900bc3000b87a5a1eb3dd938 (patch)
tree31916d20600ac83c12eaf27c97dbe4fefa579363 /llvm/lib/CodeGen/CallingConvLower.cpp
parent0713a9d8fc41cd24d73141dc5e34cd64ff14ac6e (diff)
downloadbcm5719-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.cpp2
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));
OpenPOWER on IntegriCloud