Vectorize: teach cavVectorizeMemory to distinguish between A[i]+=x and A[B[i]]+=x.
authorNadav Rotem <nrotem@apple.com>
Sat, 20 Oct 2012 08:26:33 +0000 (08:26 +0000)
committerNadav Rotem <nrotem@apple.com>
Sat, 20 Oct 2012 08:26:33 +0000 (08:26 +0000)
commitd189b82a9b92bd1f375fc9a942773aeb5b266765
treed53eaac6ccec31f2ef0279c744e2cec13dde37d4
parent206e0ecaa2967be819e223b0ba19751134a95c75
Vectorize: teach cavVectorizeMemory to distinguish between A[i]+=x and A[B[i]]+=x.
If the pointer is consecutive then it is safe to read and write. If the pointer is non-loop-consecutive then
it is unsafe to vectorize it because we may hit an ordering issue.

llvm-svn: 166371
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/increment.ll [new file with mode: 0644]
llvm/test/Transforms/LoopVectorize/read-only.ll [new file with mode: 0644]