https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113109
--- Comment #14 from Hans-Peter Nilsson <hp at gcc dot gnu.org> --- (In reply to GCC Commits from comment #9) > The master branch has been updated by Hans-Peter Nilsson <h...@gcc.gnu.org>: > > https://gcc.gnu.org/g:3d03630b123411340e52d05124cb0cacfa1fc8b0 > > commit r14-6817-g3d03630b123411340e52d05124cb0cacfa1fc8b0 > Author: Hans-Peter Nilsson <h...@axis.com> > Date: Sun Dec 24 00:10:32 2023 +0100 > > I haven't looked into why this problem, that appeared for the PA > already in 2007, was seen for CRIS only recently (with > r14-6674-g4759383245ac97). I should've removed that paragraph before committing. It's obvious from looking at r14-6674-g4759383245ac97 and the history of the expression in that context, and knowing that pa uses hard_frame_pointer_rtx... Still, why not all those other targets? (In reply to Jiu Fu Guo from comment #13) > (In reply to GCC Commits from comment #9) > > Conceptually, it's logical that stores to incoming args are > > optimized out on the return path or if no loads are seen - > > at least before epilogue expansion, when the subsequent load > > isn't seen in the RTL, as is the case for the "dse1" pass. > > The stores to the argp/frame can be eliminated only if they are not used. > While for this case, the store may be used by EH handler, it should not be > optimized out. That use is not seen before the pro/epilogue expansion pass. Maybe the pass should be restricted in what it does prior to that (not do in dse1, do in dse2). > Thanks for catching and handling this quickly. > > Happy holidays. No worries, same to you!