[PATCH] D60748: Adds an option "malign-pass-aggregate" to make the alignment of the struct and union parameters compatible with the default gcc
LiuChen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 23 17:59:17 PDT 2020
LiuChen3 marked an inline comment as done.
LiuChen3 added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:1570
+ return 4;
+ } else if (Align < 16)
+ return MinABIStackAlignInBytes;
----------------
LiuChen3 wrote:
> jyknight wrote:
> > If I understood GCC's algorithm correctly, I think this needs to come first?
> You mean it should be ?
>
>
> ```
> if (MaxAlignment < 16)
> retrun 4
> else
> return std::max(MaxAlignment, Align);
> ```
I found that the test I wrote above was wrong. Sorry for the noise.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60748/new/
https://reviews.llvm.org/D60748
More information about the cfe-commits
mailing list