This happens in gcc.dg/vect/vect-96.c and gcc.dg/vect/no-vfa-vect-43.c. In the first, we can't distinguish between a write through a (local) pointer to a global array (which is a field in a struct), and a read from a local array. s a result we vectorize the loop using loop-versioning controled by a run-time aliasing test, which also means we'll use versioning instead of peeling to align a misaligned store. In the second, we can't tell that reads through a pointer (which is a function argument) do not overlap with a write to a local array. As a result we try to vectorize the loop using loop-versioning controled by a run-time aliasing test, however this testcase doe not allow that (--param vect-max-version-for-alias-checks=0), so vectorization fails.
Mine.
Fixed.