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
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user