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

--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Xi Ruoyao <xry...@gcc.gnu.org>:

https://gcc.gnu.org/g:21a87ad785fe1e7c6504c3cf7984e74fe5a5067a

commit r15-10213-g21a87ad785fe1e7c6504c3cf7984e74fe5a5067a
Author: Xi Ruoyao <xry...@xry111.site>
Date:   Tue Jul 8 14:39:11 2025 +0800

    lra: Reallow reloading user hard registers if the insn is not asm [PR
120983]

    The PR 87600 fix has disallowed reloading user hard registers to resolve
    earlyclobber-induced conflict.

    However before reload, recog completely ignores the constraints of
    insns, so the RTL passes may produce insns where some user hard
    registers violate an earlyclobber.  Then we'll get an ICE without
    reloading them, like what we are recently encountering in LoongArch test
    suite.

    IIUC "recog does not look at constraints until reload" has been a
    well-established rule in GCC for years and I don't have enough skill to
    challange it.  So reallow reloading user hard registers (but still
    disallow doing so for asm) to fix the ICE.

    gcc/ChangeLog:

            PR rtl-optimization/120983
            * lra-constraints.cc (process_alt_operands): Allow reloading
            user hard registers unless the insn is an asm.

    (cherry picked from commit e6d3c88e7bb07f94308074f9751e4384a191e022)

Reply via email to