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

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

https://gcc.gnu.org/g:e5bcb08d132bf753178a2b30962b4a9d3452c4f2

commit r16-7000-ge5bcb08d132bf753178a2b30962b4a9d3452c4f2
Author: Andrew Pinski <[email protected]>
Date:   Wed Jan 14 16:44:17 2026 -0800

    slsr: Fix some undefined/overflow introducing bugs in SLSR [PR106883]

    This fixes the first part of SLSR incorrectly inserting undefined code
(overflow)
    into the IR. The easiest way is to rewrite the statement after creating it
    using rewrite_to_defined_unconditional.
    This fixes the testcases from PR 121347 (and a few others) which all cause
an
    infinite loops to appear.
    I will be posting the fix for replace_rhs_if_not_dup later and at that
point I
    will add a few testcases.

    Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR tree-optimization/121347
            PR tree-optimization/106883
    gcc/ChangeLog:

            * gimple-ssa-strength-reduction.cc (insert_initializers): Rewrite
            newly inserted statements for undefinedness (overflow).

    Signed-off-by: Andrew Pinski <[email protected]>

Reply via email to