Jakub Jelinek <ja...@redhat.com> writes: > On Wed, Feb 28, 2018 at 02:20:27PM +0000, Richard Sandiford wrote: >> GCC 6 and 7 would vectorise: >> >> void >> f (unsigned long incx, unsigned long incy, >> float *restrict dx, float *restrict dy) >> { >> unsigned long ix = 0, iy = 0; >> for (unsigned long i = 0; i < 512; ++i) >> { >> dy[iy] += dx[ix]; >> ix += incx; >> iy += incy; >> } >> } >> >> without first proving that incy is nonzero. This is a regression from >> GCC 5. It was fixed on trunk in r223486, which versioned the loop based > > Are you sure about the revision? This one is from 2015 and so should be in > all of GCC 6/7/8.
Oops, that was when the bug started. r256644 was the fix.