[Bug target/95237] LOCAL_DECL_ALIGNMENT shrinks alignment, FAIL gcc.target/i386/pr69454-2.c
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 2 11:06:10 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95237
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Kito Cheng from comment #6)
> Created attachment 48658 [details]
> i386-Implement-ROUND_TYPE_ALIGN-to-make-sure-alignme.patch
>
> Some optimization might made decision depend on the alignment, and alignment
> shrinking might made the decision become wrong.
Nothing will happen on i386 if alignment of long long isn't 8 bytes.
> So I prefer keep the assertion checking and implement ROUND_TYPE_ALIGN for
> x86, so that it will set the alignment properly from the beginning.
>
> PoC/untested patch attached.
The i386 psABI specifies 4 byte alignment for long long. But we want to
use 8 byte alignment if there is no ABI implication and no stack realignment
is needed. Will ROUND_TYPE_ALIGN always align long long to 8 bytes?
More information about the Gcc-bugs
mailing list