https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109093

--- Comment #35 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #17)
> Created attachment 54666 [details]
> A patch
> 
> Change ix86_find_max_used_stack_alignment to find alignments of all stack
> slot accesses.

HJ, it looks that the current detection of instructions that need increase in
stack alignment is insufficient, causing all sort of troubles (e.g.
__builtin_memset expansion in PR109780#c34 for stack variable hits this issue).

I see this problem as a defect in the x86 infrastructure (and the priority of
the bug reflects that) that should be urgently fixed. I think that the
direction your patch takes is the right approach, so I'd like to ask you to
post the patch to gcc-patches to get the ball rolling.

IMO, the increase of alignment should be triggered any time insn that requires
increased stack alignment uses a register that holds a pointer, derived from
stack or frame pointer.

Reply via email to