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

--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vladimir Makarov <vmaka...@gcc.gnu.org>:

https://gcc.gnu.org/g:2f00e6caca1a14dfe26e94f608e9d79a787ebe08

commit r15-330-g2f00e6caca1a14dfe26e94f608e9d79a787ebe08
Author: Vladimir N. Makarov <vmaka...@redhat.com>
Date:   Wed May 8 10:39:04 2024 -0400

    [PR114810][LRA]: Recognize alternatives with lack of available registers
for insn and demote them.

      PR114810 was fixed in machine-dependent way.  This patch is a fix of
    the PR on LRA side.  LRA chose alternative with constraints `&r,r,ro`
    on i686 when all operands of DImode and there are only 6 available
    general regs.  The patch recognizes such case and significantly
    increase the alternative cost.  It does not reject alternative
    completely.  So the fix is safe but it might not work for all
    potentially possible cases of registers lack as register classes can
    have any relations including subsets and intersections.

    gcc/ChangeLog:

            PR target/114810
            * lra-constraints.cc (process_alt_operands): Calculate union reg
            class for the alternative, peak matched regs and required reload
            regs.  Recognize alternatives with lack of available registers and
            make them costly.  Add debug print about this case.

Reply via email to