[LV] Don't consider pointer as uniform if it is also stored.
authorFlorian Hahn <flo@fhahn.com>
Fri, 17 Mar 2023 16:26:07 +0000 (16:26 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 17 Mar 2023 16:26:16 +0000 (16:26 +0000)
commit962c306a11d0a21c884c12e18825b8a41ba1bd7d
tree118ee36732aa0c29f55cb4615c4c2c109c9fb4de
parent3ddc88c38068449842b5ae31285d2a194f0dc4f9
[LV] Don't consider pointer as uniform if it is also stored.

Update isVectorizedMemAccessUse to also check if the pointer is stored.
This prevents LV to incorrectly consider a pointer as uniform if it is
used as both pointer and stored by the same StoreInst.

Fixes #61396.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll
llvm/test/Transforms/LoopVectorize/opaque-ptr.ll