[clang][PowerPC] PPC64 VAArg fix right-alignment for aggregates fit in register
authorTing Wang <Ting.Wang.SH@ibm.com>
Mon, 17 Oct 2022 02:01:47 +0000 (22:01 -0400)
committerTing Wang <Ting.Wang.SH@ibm.com>
Mon, 17 Oct 2022 02:01:47 +0000 (22:01 -0400)
commitee703b5cb134d182c2b589360714feab97f6a1cc
treea5c92ddccedba730e6fc53341686db148784c763
parent5ea3155565fb724966d0e38c09ff7b784225018f
[clang][PowerPC] PPC64 VAArg fix right-alignment for aggregates fit in register

PPC64 ABI pass aggregates smaller than a register into the least
significant bits of the register. In the case of variadic functions,
they will end up right-aligned in their argument slots in the argument
area on big-endian targets. Apply right-alignment for these aggregates.

Fixes #55900.

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D133338
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/PowerPC/ppc64-align-struct.c