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)
commitbf8772ed2cc89a495e2692919331d7a03e76d791
tree3c1faa44bfb500db8f771c28f2229a0c90b5e41a
parent71a148223907504c78f90f835131d5e8921011ad
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166371 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/increment.ll [new file with mode: 0644]
test/Transforms/LoopVectorize/read-only.ll [new file with mode: 0644]