[LV] Teach vectorizer about variant value store into uniform address
authorAnna Thomas <anna@azul.com>
Tue, 16 Oct 2018 15:46:26 +0000 (15:46 +0000)
committerAnna Thomas <anna@azul.com>
Tue, 16 Oct 2018 15:46:26 +0000 (15:46 +0000)
commit6f732bfb7900be621bf43002105ec05da62e679a
treeb2e4f5250099752d2d474107db6b431e9bda0603
parentbb3dd34e62d2b53402a84d9d8b2a3c865fdf43fd
[LV] Teach vectorizer about variant value store into uniform address

Summary:
Teach vectorizer about vectorizing variant value stores to uniform
address. Similar to rL343028, we do not allow vectorization if we have
multiple stores to the same uniform address.

Cost model already has the change for considering the extract
instruction cost for a variant value store. See added test cases for how
vectorization is done.
The patch also contains changes to the ORE messages.

Reviewers: Ayal, mkuper, anemet, hsaito

Subscribers: rkruppe, llvm-commits

Differential Revision: https://reviews.llvm.org/D52656

llvm-svn: 344613
llvm/include/llvm/Analysis/LoopAccessAnalysis.h
llvm/lib/Analysis/LoopAccessAnalysis.cpp
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Analysis/LoopAccessAnalysis/memcheck-wrapping-pointers.ll
llvm/test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll
llvm/test/Analysis/LoopAccessAnalysis/store-to-invariant-check2.ll
llvm/test/Analysis/LoopAccessAnalysis/store-to-invariant-check3.ll
llvm/test/Transforms/LoopVectorize/X86/illegal-parallel-loop-uniform-write.ll
llvm/test/Transforms/LoopVectorize/X86/invariant-store-vectorization.ll
llvm/test/Transforms/LoopVectorize/invariant-store-vectorization.ll