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

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

https://gcc.gnu.org/g:da65c9d0ae20eda452e52ab9b2e3e110911a2d21

commit r16-7119-gda65c9d0ae20eda452e52ab9b2e3e110911a2d21
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