JiruiWu marked an inline comment as done.
JiruiWu added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:5813
getContext().getTypeUnadjustedAlignInChars(Ty).getQuantity();
- unsigned BaseAlign = getContext().getTypeAlignInChars(Base).getQuantity();
- Align = (Align > BaseAlign && Align >= 16) ? 16 : 0;
+ Align = (Align >= 16) ? 16 : 8;
return ABIArgInfo::getDirect(
----------------
chill wrote:
> The backend ought to set the minimum alignment of a stack slot to 8 anyway
> (for AAPCS), hence setting the minimum here to 8 is redundant.
>
This 8 is necessary. I tried to use 0 instead of 8 but clang set the alignment
to 16 by default, which is wrong. Specifying the alignment to 8 here fixes the
problem.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146242/new/
https://reviews.llvm.org/D146242
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits