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

--- Comment #9 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:b484690a29147fa190ccb74e0253b2ac89a4ee6d

commit r17-2182-gb484690a29147fa190ccb74e0253b2ac89a4ee6d
Author: Andrew MacLeod <[email protected]>
Date:   Tue Jun 30 10:43:07 2026 -0400

    Ranger stmt prefill should process dependencies first.

    Rangers stmt prefill is designed to prevent deep recursion through the
    normal range_of_stmt/range_of_expr/Range_on_entry cycle when
    dependencies have not yet been processed.  It neglects to do this for
    PHI arguments and if the order is wrong, it can undo everything it is
    suppose to solve.

    Do a proper DFS stack simulation to process all operands properly.

            PR tree-optimization/125758
            gcc/
            * gimple-range.cc (gimple_ranger::gimple_ranger): Create prefill
stack.
            (gimple_ranger::gimple_ranger): Dispose of prefill stack.
            (gimple_ranger::prefill_name): Maybe push name on prefill stack.
            (gimple_ranger::prefill_stmt_dependencies): Implement a DFS
            stack for dependency satisfaction.
            * gimple-range.h (struct prefill_frame): New.
            (m_prefill_stack): New.
            (prefill_name): Sadjust parameters.
            (m_active_prefill): New.

Reply via email to