diff options
author | Anna Thomas <anna@azul.com> | 2018-10-16 15:46:26 +0000 |
---|---|---|
committer | Anna Thomas <anna@azul.com> | 2018-10-16 15:46:26 +0000 |
commit | 6f732bfb7900be621bf43002105ec05da62e679a (patch) | |
tree | b2e4f5250099752d2d474107db6b431e9bda0603 /llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp | |
parent | bb3dd34e62d2b53402a84d9d8b2a3c865fdf43fd (diff) | |
download | bcm5719-llvm-6f732bfb7900be621bf43002105ec05da62e679a.tar.gz bcm5719-llvm-6f732bfb7900be621bf43002105ec05da62e679a.zip |
[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
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp index 7e11504c0e0..bde90a71b41 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp @@ -817,11 +817,12 @@ bool LoopVectorizationLegality::canVectorizeMemory() { if (!LAI->canVectorizeMemory()) return false; - if (LAI->hasVariantStoreToLoopInvariantAddress()) { + if (LAI->hasMultipleStoresToLoopInvariantAddress()) { ORE->emit(createMissedAnalysis("CantVectorizeStoreToLoopInvariantAddress") - << "write of variant value to a loop invariant address could not " + << "multiple writes to a loop invariant address could not " "be vectorized"); - LLVM_DEBUG(dbgs() << "LV: We don't allow storing to uniform addresses\n"); + LLVM_DEBUG( + dbgs() << "LV: We don't allow multiple stores to a uniform address\n"); return false; } |