Re: [PATCH] tree-optimization/114413 - SLP CSE after permute optimization

2024-06-19 Thread Richard Sandiford
Richard Biener writes: > On Wed, 19 Jun 2024, Richard Sandiford wrote: > >> Richard Biener writes: >> > We currently fail to re-CSE SLP nodes after optimizing permutes >> > which results in off cost estimates. For gcc.dg/vect/bb-slp-32.c >> > this shows in not re-using the SLP node with the load

Re: [PATCH] tree-optimization/114413 - SLP CSE after permute optimization

2024-06-19 Thread Richard Biener
On Wed, 19 Jun 2024, Richard Sandiford wrote: > Richard Biener writes: > > We currently fail to re-CSE SLP nodes after optimizing permutes > > which results in off cost estimates. For gcc.dg/vect/bb-slp-32.c > > this shows in not re-using the SLP node with the load and arithmetic > > for both th

Re: [PATCH] tree-optimization/114413 - SLP CSE after permute optimization

2024-06-19 Thread Richard Sandiford
Richard Biener writes: > We currently fail to re-CSE SLP nodes after optimizing permutes > which results in off cost estimates. For gcc.dg/vect/bb-slp-32.c > this shows in not re-using the SLP node with the load and arithmetic > for both the store and the reduction. The following implements > CS

[PATCH] tree-optimization/114413 - SLP CSE after permute optimization

2024-06-19 Thread Richard Biener
We currently fail to re-CSE SLP nodes after optimizing permutes which results in off cost estimates. For gcc.dg/vect/bb-slp-32.c this shows in not re-using the SLP node with the load and arithmetic for both the store and the reduction. The following implements CSE by re-bst-mapping nodes as final