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

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

https://gcc.gnu.org/g:4ab2c727829c53b87a8be43dc2d0d036d23a1700

commit r17-1422-g4ab2c727829c53b87a8be43dc2d0d036d23a1700
Author: Richard Sandiford <[email protected]>
Date:   Mon Jun 8 13:38:55 2026 +0100

    backprop: Avoid early return for abnormal phis [PR125653]

    r17-1238-g8e3eff39a4564c added an early return for SSA names that
    occur in abnormal phis.  That had the effect of bypassing the later:

              /* If STMT is a phi, remove any information recorded for
                 its arguments.  */
              if (is_a <gphi *> (stmt))
                reprocess_inputs (stmt);

    That reprocessing is important since (by design) the pass initially
    makes optimistic assumptions about backedges.

    gcc/
            PR tree-optimization/125653
            * gimple-ssa-backprop.cc (backprop::process_var): Avoid early
            return for SSA names that occur in abnormal phis.

    gcc/testsuite/
            PR tree-optimization/125653
            * gcc.dg/torture/pr125653.c: New test.

Reply via email to