[Bug middle-end/123986] [16 Regression] ICE in SLP

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

--- Comment #9 from GCC Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:40e2274ec0f62fbac076beeeb80239ce3b1b71fc

commit r16-7333-g40e2274ec0f62fbac076beeeb80239ce3b1b71fc
Author: Josef Melcr 
Date:   Thu Feb 5 15:21:00 2026 +0100

testsuite: Add testcase for PR123986

This patch add a missing testcase cvise-reduced
testcase for PR123986.

PR tree-optimization/123986

gcc/testsuite/ChangeLog:

* gfortran.dg/vect/pr123986.f90: New test.

Signed-off-by: Josef Melcr 

[Bug middle-end/123986] [16 Regression] ICE in SLP

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #8 from Richard Biener  ---
Fixed.

[Bug middle-end/123986] [16 Regression] ICE in SLP

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

--- Comment #7 from GCC Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:12e97ffdb516bae81b823a247250dc2d7ce8e566

commit r16-7325-g12e97ffdb516bae81b823a247250dc2d7ce8e566
Author: Richard Biener 
Date:   Thu Feb 5 12:26:18 2026 +0100

tree-optimization/123986 - upon SLP analysis rollback, release data

The following makes sure to release any SLP kind specific data when
rolling back earlier successful analysis.  This avoids crashing
when re-analyzing such node via another graph entry.

PR tree-optimization/123986
* tree-vect-slp.cc (vect_slp_analyze_operations): When
rolling back analyzed nodes, release node specific data
and reset SLP_TREE_TYPE.

[Bug middle-end/123986] [16 Regression] ICE in SLP

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

--- Comment #6 from Richard Biener  ---
So the issue is we're analyzing the same node multiple times and that
makes

  vect_simd_clone_data _data;  
  vect_simd_clone_data &data = slp_node->get_data (_data);

inconsistent with the intent to have this be _data when analyzing (cost_vec !=
NULL).  That causes a ->data to be overwritten by garbage at:

4538  slp_node->data = new vect_simd_clone_data (std::move (_data));

but the point is of course we should not be analyzing a node twice.  We're
doing this because we are also supporting a "rollback" of some sorts.

Testing a patch.

[Bug middle-end/123986] [16 Regression] ICE in SLP

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

Richard Biener  changed:

   What|Removed |Added

   Last reconfirmed||2026-02-05
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Status|UNCONFIRMED |ASSIGNED
   Keywords|needs-bisection |
 Ever confirmed|0   |1

--- Comment #5 from Richard Biener  ---
Ah, I can reproduce, it needs the mvec -fpre-include.

[Bug middle-end/123986] [16 Regression] ICE in SLP

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-bisection
Summary|[gcc16 regression] ICE in   |[16 Regression] ICE in SLP
   |SLP |
   Target Milestone|--- |16.0

--- Comment #4 from Richard Biener  ---
I fear it's a latent issue now.  Can somebody bisect the fix?