ARM: use ABI-specified alignment for byval parameters.
authorTim Northover <tnorthover@apple.com>
Mon, 9 Mar 2015 21:40:42 +0000 (21:40 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 9 Mar 2015 21:40:42 +0000 (21:40 +0000)
commitd157e195620ae9047129d705b5a9f93cf2a20b0b
tree88d4047e3a0ea5b328ad5ac32551a948f1e523ad
parenta3175bab8845c87011cfddc2bd97ef7920d43ae1
ARM: use ABI-specified alignment for byval parameters.

When passing a type with large alignment byval, we were specifying the type's
alignment rather than the alignment that the backend is actually capable of
producing (ABIAlign).

This would be OK (if odd) assuming the backend dealt with it prooperly,
unfortunately it doesn't and trying to pass types with "byval align 16" can
cause it to set fp incorrectly and trash the stack during the prologue. I'll be
fixing that in a separate patch, but Clang should still be emitting IR that's
as close to its intent as possible.

rdar://20059039

llvm-svn: 231706
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/arm-aapcs-vfp.c
clang/test/CodeGen/arm-arguments.c