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

--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Richard Biener
<[email protected]>:

https://gcc.gnu.org/g:57efa2046671372c1e17cec6100e23716af688b9

commit r16-9266-g57efa2046671372c1e17cec6100e23716af688b9
Author: Richard Biener <[email protected]>
Date:   Thu Jun 11 15:51:02 2026 +0200

    tree-optimization/125730 - avoid losing track of base in IVOPTs

    The PR highlights several places where IVOPTs gets lost in tracking
    an appropriate base to use for a TARGET_MEM_REF.  The following
    addresses the initial place, enough to fix the bug, but already
    showing difficulties in avoiding fallout.  The first place is
    alloc_iv where we convert the nice pointer IV to an unsigned integer
    before applying affine canonicalization.

    Removing that resolves the PR and with the fold_plusminus_mult_expr
    change tests without regressions on x86_64.

            PR tree-optimization/125730
            * tree-ssa-loop-ivopts.cc (alloc_iv): Do not convert pointer
            IVs to unsigned before canonicalizing.

            * gcc.dg/torture/pr125730.c: New testcase.

    (cherry picked from commit c36539e6fd0dfa6bd1ebb891df68da9a5bd96163)

Reply via email to