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

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

https://gcc.gnu.org/g:2894493adf7434a83b9ead2617468e817b337126

commit r16-8110-g2894493adf7434a83b9ead2617468e817b337126
Author: Richard Biener <[email protected]>
Date:   Mon Mar 16 09:55:26 2026 +0100

    tree-optimization/124528 - UB from SCEV

    SCEV has a long-standing issue in that it negates the addend of
    a subtraction within a SSA cycle without considering UB from
    negating of the most negative value.  The following tries to
    rectify this.

            PR tree-optimization/124528
            * tree-scalar-evolution.cc (scev_dfs::add_to_evolution):
            Perform the negation in an unsigned type if we cannot make
            sure it will not cause UB.

            * gcc.dg/tree-ssa/scev-17.c: New testcase.

Reply via email to