]> granicus.if.org Git - llvm/commit
[LV] Considier non-consecutive but vectorizable accesses for VF selection
authorMatthew Simpson <mssimpso@codeaurora.org>
Thu, 2 Mar 2017 13:55:05 +0000 (13:55 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Thu, 2 Mar 2017 13:55:05 +0000 (13:55 +0000)
commit465f5a16f9d8b68b4b3401c9c04d3ba7b51dfb72
treec0b0a1203c202d886967d990e443980f84ff3222
parent3a93c4ad6c4b9733e14d19cdd21105b8a7acc1e0
[LV] Considier non-consecutive but vectorizable accesses for VF selection

When computing the smallest and largest types for selecting the maximum
vectorization factor, we currently ignore loads and stores of pointer types if
the memory access is non-consecutive. We do this because such accesses must be
scalarized regardless of vectorization factor, and thus shouldn't be considered
when determining the factor. This patch makes this check less aggressive by
also considering non-consecutive accesses that may be vectorized, such as
interleaved accesses. Because we don't know at the time of the check if an
accesses will certainly be vectorized (this is a cost model decision given a
particular VF), we consider all accesses that can potentially be vectorized.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296747 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/AArch64/smallest-and-widest-types.ll [new file with mode: 0644]