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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <l...@gcc.gnu.org>:

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

commit r15-7874-gaef04968cfba0feb4420d96c61f766ee6c73f957
Author: Alexey Merzlyakov <alexey.merzlya...@samsung.com>
Date:   Thu Mar 6 14:42:59 2025 -0700

    [PR rtl-optimization/119099] Avoid infinite loop in ext-dce.

    This fixes the ping-ponging of live sets in ext-dce which is left
    unresolved can lead to infinite loops in the ext-dce pass as seen by the
    P1 regression 119099.

    At its core instead of replacing the livein set with the just recomputed
    data, we IOR in the just recomputed data to the existing livein set.
    That ensures the  existing livein set never shrinks.

    Bootstrapped and regression tested on x86.  I've also thrown this into
    my tester to verify it across multiple targets and that we aren't
    regressing the (limited) tests we have in place for ext-dce's
    optimization behavior.

    While it's a generic patch, I'll wait for the RISC-V tester to run is
    course before committing.

            PR rtl-optimization/119099
    gcc/
            * ext-dce.cc (ext_dce_rd_transfer_n): Do not allow the livein
            set to shrink.

    gcc/testsuite/
            * gcc.dg/torture/pr119099.c: New test.

                Co-authored-by: Jeff Law  <j...@ventanamicro.com>

Reply via email to