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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xry111 at gcc dot gnu.org

--- Comment #10 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
This is causing stupid codegen in libc functions open, openat, (In reply to
Jonathan Gruber from comment #9)
> (In reply to Andrew Pinski from comment #4)
> > The riscv with noap is a target specific issue.
> 
> Should I file a new riscv-specific bug for that?

Yes, to me it needs something like I've done for LoongArch at r14-69.  I
already noticed the issue described in this PR when I made the commit, quote
from the commit log:

> With this patch, only one GAR ($a2/$r6) is saved in open().  Ideally
> even this stack store should be omitted too, but doing so is not trivial
> and AFAIK there are no compilers (for any target) performing the "ideal"
> optimization here, see https://godbolt.org/z/n1YqWq9c9.

Reply via email to