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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <[email protected]>:

https://gcc.gnu.org/g:5acdceb6e77753e54c3de1c7d3a73bf3d457ca85

commit r17-5788-g5acdceb6e77753e54c3de1c7d3a73bf3d457ca85
Author: Jeff Law <[email protected]>
Date:   Sun Nov 1 15:27:39 2026 -0700

    [RISC-V][PR target/128139] Don't create pseudos when !can_create_pseudos_p
on RISC-V

    Dumb mistake on my part.  When I added a new path to call synthesize_add I
    didn't account for the possibility it could be called after the point where
no
    new pseudos are allowed.

    The good news is that new path can handle synthesize_add returning false
(no
    synthesis available) so we just need to return false from synthesize_add if
the
    synthesis requires creating a new pseudo register (we could probably
improve
    that further by re-using the output if it doesn't overlap the register
input,
    but these paths should be very uncommon, so likely not worth the effort).

    Regression tested on riscv32-elf and riscv64-elf.  K3, K1 and C920 are all
    queued.  Pushing to the trunk.

            PR target/128139
    gcc/
            * config/riscv/riscv.cc (synthesize_add): Do not create pseudos
            when !can_create_pseudos_p.

    gcc/testsuite
            * gcc.target/riscv/pr128139.c: New test.

Reply via email to