OSDN Git Service

[LV] Reallow positive-stride interleaved load groups with gaps
authorMatthew Simpson <mssimpso@codeaurora.org>
Wed, 27 Apr 2016 18:21:36 +0000 (18:21 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Wed, 27 Apr 2016 18:21:36 +0000 (18:21 +0000)
commitfacf17cd030a83044b80d2438f3a7e3915a28890
treea45d78f3238090170e4f70dd502b23837ec1f3c6
parent9841605a5a985251918022a9ddb0ed6a1c294100
[LV] Reallow positive-stride interleaved load groups with gaps

We previously disallowed interleaved load groups that may cause us to
speculatively access memory out-of-bounds (r261331). We did this by ensuring
each load group had an access corresponding to the first and last member.
Instead of bailing out for these interleaved groups, this patch enables us to
peel off the last vector iteration, ensuring that we execute at least one
iteration of the scalar remainder loop. This solution was proposed in the
review of the previous patch.

Differential Revision: http://reviews.llvm.org/D19487

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267751 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/interleaved-accesses.ll