================
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const
BaseSubobjectInfo *Base) {
setSize(std::max(getSize(), Offset + Layout.getSize()));
// Remember max struct/class alignment.
+ UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign);
----------------
hvdijk wrote:
> If you pass arguments on the stack (use up all the registers), the alignment
> matters even on Apple... for non-HFA types, at least.
Ah, of course, thanks for pointing that out.
> I think it would be better to get that testing in this patch; it really
> should've been part of the original composite alignment patch, because the
> fact that some targets explicitly don't use it is a major aspect of the work.
I get where you're coming from but `aapcs64-align.cpp` is specifically for
testing AAPCS64 alignment, I don't think it would be right to extend that to
checking that non-AAPCS64 targets *don't* use the AAPCS64 ABI. We could
possibly add this to the `clang/test/CodeGen/AArch64/args*` tests, I'll have a
look.
https://github.com/llvm/llvm-project/pull/135564
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits