Re: [PATCH] RFC: Optimise SLP permutes of non-consecutive loads

2022-06-24 Thread Richard Biener via Gcc-patches
On Fri, 24 Jun 2022, Richard Sandiford wrote: > Richard Biener writes: > > On Thu, 23 Jun 2022, Richard Sandiford wrote: > >> In a reduction pair like: > >> > >> typedef float T; > >> > >> void > >> f1 (T *x) > >> { > >> T res1 = 0; > >> T res2 = 0; > >> for (int i = 0; i <

Re: [PATCH] RFC: Optimise SLP permutes of non-consecutive loads

2022-06-24 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Thu, 23 Jun 2022, Richard Sandiford wrote: >> In a reduction pair like: >> >> typedef float T; >> >> void >> f1 (T *x) >> { >> T res1 = 0; >> T res2 = 0; >> for (int i = 0; i < 100; ++i) >> { >> res1 += x[i * 2]; >> res2 += x[i * 2

Re: [PATCH] RFC: Optimise SLP permutes of non-consecutive loads

2022-06-24 Thread Richard Biener via Gcc-patches
On Thu, 23 Jun 2022, Richard Sandiford wrote: > In a reduction pair like: > > typedef float T; > > void > f1 (T *x) > { > T res1 = 0; > T res2 = 0; > for (int i = 0; i < 100; ++i) > { > res1 += x[i * 2]; > res2 += x[i * 2 + 1]; > } > x[0] = res1; >

[PATCH] RFC: Optimise SLP permutes of non-consecutive loads

2022-06-23 Thread Richard Sandiford via Gcc-patches
In a reduction pair like: typedef float T; void f1 (T *x) { T res1 = 0; T res2 = 0; for (int i = 0; i < 100; ++i) { res1 += x[i * 2]; res2 += x[i * 2 + 1]; } x[0] = res1; x[1] = res2; } it isn't easy to predict whether the initial reducti