[Bug c++/125599] [17 Regression] ice during GIMPLE pass: backprop with -O3

2026-06-05 Thread rsandifo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125599

Richard Sandiford  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #9 from Richard Sandiford  ---
Fixed.

[Bug c++/125599] [17 Regression] ice during GIMPLE pass: backprop with -O3

2026-06-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125599

--- Comment #8 from GCC Commits  ---
The trunk branch has been updated by Richard Sandiford :

https://gcc.gnu.org/g:9f6e172f7402f1a020b6e3fd3f611f4dfa81af95

commit r17-1366-g9f6e172f7402f1a020b6e3fd3f611f4dfa81af95
Author: Richard Sandiford 
Date:   Fri Jun 5 09:18:34 2026 +0100

backprop: Calculate transitive closures of replacements [PR125599]

This PR had the equivalent of:

L1:
  x = PHI(1, z)
  y = -x
  ...
L2:
  z = PHI(x, y)

where z could be simplified to:

  z = PHI(x, x)

i.e. to x.  Changing z triggered a need to replace x with a new SSA name,
but z was left being replaced with x, rather than x's replacement.

Since the replacement values are (of course) restricted to using
dominating definitions, a single RPO pass is enough to calculate the
transitive closure of replacement values.

gcc/
PR tree-optimization/125599
* gimple-ssa-backprop.cc (backprop::execute): Calculate the
transitive closure of replacement values.

gcc/testsuite/
PR tree-optimization/125599
* g++.dg/torture/pr125599.C: New test.

[Bug c++/125599] [17 Regression] ice during GIMPLE pass: backprop with -O3

2026-06-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125599

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
   Target Milestone|--- |17.0
Summary|ice during GIMPLE pass: |[17 Regression] ice during
   |backprop with -O3   |GIMPLE pass: backprop with
   ||-O3
Version|16.0|17.0
   Keywords||ice-on-valid-code

--- Comment #7 from Richard Biener  ---
Looks related to PR125579.