[Bug tree-optimization/104917] No runtime alias test required for dependent reductions
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 15 09:21:49 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104917
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> What if x = y + 1 or y = x + 1 ?
We then do
(y+1)[i] += a[i];
(y+1)[i+1] += a[i+1];
y[i] += a[i];
y[i+1] += a[i+1];
instead of
(y+1)[i] += a[i];
y[i] += a[i];
(y+1)[i+1] += a[i+1];
y[i+1] += a[i+1];
which should be OK if re-associating the adds to y[i+1] is OK.
More information about the Gcc-bugs
mailing list