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

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

https://gcc.gnu.org/g:0ebadbad7c92133c467f7aed6f3c16a9e3b55774

commit r17-3357-g0ebadbad7c92133c467f7aed6f3c16a9e3b55774
Author: Aldy Hernandez <[email protected]>
Date:   Mon Aug 17 14:53:24 2026 +0000

    path solver: only compute ranges at the current path position [PR126876]

    Since r17-3298 the path ranger can become the current query while
    fold_using_range folds a statement, so match.pd simplifications can
    query with a context statement that can be from an arbitrary block on
    the path.  The solver's positional machinery is only meaningful at the
    block the walk is currently at.

    Only compute ranges at the current path position otherwise fall back
    to the global range.  Assert the positional invariant in
    range_defined_in_block, which I verified holds by testing the assert
    on a tree before r17-3298.

    Tested on ppc64le Linux.

            PR tree-optimization/126876

    gcc/ChangeLog:

            * gimple-range-path.cc
            (path_range_query::internal_range_of_expr): Only call
            range_defined_in_block at the current path position.
            (path_range_query::range_defined_in_block): Assert the current
            path position.

Reply via email to