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

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

https://gcc.gnu.org/g:95c98c5368aedf2a482bf551cd2573c1961a6823

commit r14-11330-g95c98c5368aedf2a482bf551cd2573c1961a6823
Author: Richard Biener <[email protected]>
Date:   Wed Jan 15 14:31:57 2025 +0100

    tree-optimization/115494 - PRE PHI translation and ranges

    When we PHI translate dependent expressions we keep SSA defs in
    place of the translated expression in case the expression itself
    did not change even though it's context did and thus the validity
    of ranges associated with it.  That eventually leads to simplification
    errors given we violate the precondition that used SSA defs fed to
    vn_valueize are valid to use (including their associated ranges).
    The following makes sure to replace those with new representatives
    always, not only when the dependent expression translation changed it.

    The fix was originally discovered by Michael Morin.

            PR tree-optimization/115494
            * tree-ssa-pre.cc (phi_translate_1): Always generate a
            representative for translated dependent expressions.

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

    Co-Authored-By: Mikael Morin <[email protected]>
    (cherry picked from commit ea1deefe54ea1c5182bfa179abf36469c9ec6974)
  • [Bug tree-optimization/115494] ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to