================
@@ -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);
----------------
efriedma-quic 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.  For HFAs, apparently it 
doesn't matter.  And MSVC has its own funny take on the rules for AArch64: it 
will pass a misaligned NEON vector on the stack for HVAs containing NEON 
vectors.

It would be nice to have testcases for all the combinations of 
Windows/OSX/Linux, register/stack, integer/HFA/HVA, and outer/member 
alignment... but I guess it doesn't need to be in this patch.  So I'm okay with 
this going in as-is.

https://github.com/llvm/llvm-project/pull/135564
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to