[LV] Avoid vectorizing unsafe dependencies in uniform address
authorAnna Thomas <anna@azul.com>
Mon, 19 Nov 2018 15:39:59 +0000 (15:39 +0000)
committerAnna Thomas <anna@azul.com>
Mon, 19 Nov 2018 15:39:59 +0000 (15:39 +0000)
commit5e9215f02bc54f89148da065e40948fbd038a2c4
tree1eaa4dd24264f27c4662669ecae046ebf5613f65
parent8a063df19435af25eadd30734be1b76275cbb56b
[LV] Avoid vectorizing unsafe dependencies in uniform address

Summary:
Currently, when vectorizing stores to uniform addresses, the only
instance we prevent vectorization is if there are multiple stores to the
same uniform address causing an unsafe dependency.
This patch teaches LAA to avoid vectorizing loops that have an unsafe
cross-iteration dependency between a load and a store to the same uniform address.

Fixes PR39653.

Reviewers: Ayal, efriedma

Subscribers: rkruppe, llvm-commits

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

llvm-svn: 347220
llvm/include/llvm/Analysis/LoopAccessAnalysis.h
llvm/lib/Analysis/LoopAccessAnalysis.cpp
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.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/invariant-store-vectorization.ll