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

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Vladimir Makarov
<[email protected]>:

https://gcc.gnu.org/g:673f17a48cbbc4f7f9881cb35b43e9b96994efae

commit r15-10844-g673f17a48cbbc4f7f9881cb35b43e9b96994efae
Author: Vladimir N. Makarov <[email protected]>
Date:   Wed Jan 28 10:52:21 2026 -0500

    [PR121571, LRA]: Reprocess asm insn with different preferences when there
are no enough regs for the asm-insn

    The test for the PR contains asm insn requiring 7 general regs but
    three operands can be in memory too ('g' constraint).  There are only
    6 available general regs.  IRA in the test case assigns a mask reg to
    one pseudo.  When LRA reloads the pseudo assigned to mask reg, it
    frees general reg assigned to another pseudo in the asm and assigns
    mask reg to another pseudo.  After a few iterations, we have asm all
    operands of which are reload pseudos assigned to general regs and one
    pseudo assigned to mask reg.  After that LRA can do nothing and
    reports "not enough regs".  The patch recognizes situation when there
    are not enough regs for an asm insn and makes 2nd attempt to find
    reloads when memory for operands with 'g' or 'rm' constraint is
    preferred.

    gcc/ChangeLog:

            PR target/121571
            * lra-constraints.cc (process_alt_operands): Reprocess asm insn
            when there are no enough regs for the asm-insn.

    gcc/testsuite/ChangeLog:

            PR target/121571
            * gcc.target/i386/pr121571.c: New.

Reply via email to