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

--- Comment #18 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:8bc11df218b3b9af0002188a6dfdf81e751ea278

commit r15-10597-g8bc11df218b3b9af0002188a6dfdf81e751ea278
Author: Vladimir N. Makarov <[email protected]>
Date:   Fri Dec 5 14:21:38 2025 -0500

    [PR122215, IRA]: Fix undefined behaviour of improve_allocation

    Register filters are used in one loop of improve_allocation to ignore some
    hard regs for cost calculation but it is missed in the subsequent loop
    using the costs.  This results in usage of random (undefined) register
costs
    and in sporadic code generation for riscv32 which uses the filters.

    gcc/ChangeLog:

            PR rtl-optimization/122215
            * ira-color.cc (improve_allocation): Use register filter for all
            loop on hard regs.

    gcc/testsuite/ChangeLog:

            PR rtl-optimization/122215
            * gcc.target/riscv/pr122215.c: New.
            * lib/target-supports.exp (check_effective_target_valgrind): New.

Reply via email to