[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 12:55:09 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95237
--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to rguenther@suse.de from comment #9)
> > 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?
>
> So what we want here is RTL expansion pad out stack slots if they know
> to be aligned but not adjust DECL_ALIGN. Not sure if there's already
> a target hook to pad out variables, if not this may be the way to get
> what you desire here.
>
> I guess the actual reason is crossing of cache-lines?
If the incoming stack is 4 byte aligned, we can't align long long to
8 bytes without stack realignment.
More information about the Gcc-bugs
mailing list