Re: [PATCH] unroll: Avoid unnecessary tail loops for constant niters

2021-07-20 Thread Richard Biener via Gcc-patches
On July 20, 2021 5:31:17 PM GMT+02:00, Richard Sandiford via Gcc-patches wrote: >unroll and jam can decide to unroll the outer loop of a nest like: > > for (int j = 0; j < n; ++j) >for (int i = 0; i < n; ++i) > x[i] += __builtin_expf (y[j][i]); > >It then uses a tail loop to handle any

[PATCH] unroll: Avoid unnecessary tail loops for constant niters

2021-07-20 Thread Richard Sandiford via Gcc-patches
unroll and jam can decide to unroll the outer loop of a nest like: for (int j = 0; j < n; ++j) for (int i = 0; i < n; ++i) x[i] += __builtin_expf (y[j][i]); It then uses a tail loop to handle any left-over iterations. However, the code is structured so that this tail loop is always