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

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

https://gcc.gnu.org/g:16c272814a0b09b859adb10ea760b59f47c993a6

commit r17-6742-g16c272814a0b09b859adb10ea760b59f47c993a6
Author: Andrew MacLeod <[email protected]>
Date:   Wed Nov 25 10:19:30 2026 -0500

    Limit GORI to a single level of recomputation.

    While solving a branch backwards, GORI asks for an operandâs range.
Ranger can walk several earlier edges and recompute the operand on each one.
Each of those recomputations can launch another backwards solve through the
same shared SSA definitions.

    Every level of recompuation gives every branch of that search another
chance to fan out. Yet the deeper queries are only trying to refine inputs to
another calculation.

    This patch limits recompuations on an edge to a single recomputation at
    a time, removing the nesting.  We lose the second and third order
    recomputations, but limit the compile time trouble we can get into.  It
    does not limit GORI in any other way.

    The Wstringop-overflow-4.C now passes as it was a third order
    recomputation which was introducing the bogus warning.

            PR tree-optimization/128996
            gcc/
            * gimple-range-gori.cc (gori_compute::has_edge_range_p): Elimintate
            nested recomputations.

            gcc/testsuite/
            * g++.dg/warn/Wstringop-overflow-4.C: Remove a bogus warning check.
            * gcc.dg/pr128996.c: New

Reply via email to