[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)
commit622b95be7b0b49e6e428cff3bc7759bc544994aa
tree1c53075e5328b3bc17f91aa0d720bab2bb06b874
parentccd318dc7ec4365ea03a68d7fe13929ea0b1b3c8
[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

llvm-svn: 267751
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll