I fixed consecutive memory access detection in Loop Vectorizer.
It did not handle correctly cases without GEP.
I started from this loop that wasn't vectorized.
for (int i=0; i<len; i++)
*to++ = *from++;
Probably this loop should be resolved with memcpy, but it is another pass. Current loop vectorizer does not recognize consecutive memory access, because the generated code performs load/store without GEP. I use SCEV to detect consecutive access.
No, this should be something like:
const ValueToValueMap &Strides = getSymbolicStrides() ? *getSymbolicStrides() : ValueToValueMap();
int Stride = getPtrStride(PSE, Ptr, TheLoop, Strides, true, false);