https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271
Jiu Fu Guo <guojiufu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |guojiufu at gcc dot gnu.org --- Comment #13 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #10) > (In reply to comment #9) > > Andrew, > > > > What is your point here? > > My point here is that currently we do: > gi->frame_related = > (base == frame_pointer_rtx) || (base == hard_frame_pointer_rtx); > > But if we change it to be: > gi->frame_related = > (base == frame_pointer_rtx) || (base == hard_frame_pointer_rtx) > || (base == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM]); > > It would delete the store (at least in a 4.3 based compiler). > arg_pointer_rtx is the incoming argument space so if it is a fixed register > it will be also frame related and we can safely delete the stores to this > space. https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639550.html is using this idea too. And the 'std' in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271#c2 disappeared.