[LV] Ensure reverse interleaved group GEPs remain uniform
authorMatthew Simpson <mssimpso@codeaurora.org>
Fri, 2 Sep 2016 16:19:22 +0000 (16:19 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Fri, 2 Sep 2016 16:19:22 +0000 (16:19 +0000)
commitb65c230eab30b3fa5586d1459d115300a219e781
tree55db48d546713712f2cfa03dd1490edcc0ad639a
parentf26ef0a27afc42450e5af19135a32755b9f47b1d
[LV] Ensure reverse interleaved group GEPs remain uniform

For uniform instructions, we're only required to generate a scalar value for
the first vector lane of each unroll iteration. Thus, if we have a reverse
interleaved group, computing the member index off the scalar GEP corresponding
to the last vector lane of its pointer operand technically makes the GEP
non-uniform. We should compute the member index off the first scalar GEP
instead.

I've added the updated member index computation to the existing reverse
interleaved group test.

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