[LSV] Don't assume that loads/stores appear in address order in the BB.
authorJustin Lebar <jlebar@google.com>
Wed, 20 Jul 2016 00:55:12 +0000 (00:55 +0000)
committerJustin Lebar <jlebar@google.com>
Wed, 20 Jul 2016 00:55:12 +0000 (00:55 +0000)
commit6114b378380904423cf7dd5abc94b11dfe5f59f9
tree0ebc3ccf63f12bf04a13c979bdc230699b6f9a08
parent58dda5a7169a8f1921f179842febd21fba48d624
[LSV] Don't assume that loads/stores appear in address order in the BB.

Summary:
getVectorizablePrefix previously didn't work properly in the face of
aliasing loads/stores.  It unwittingly assumed that the loads/stores
appeared in the BB in address order.  If they didn't, it would do the
wrong thing.

Reviewers: asbirlea, tstellarAMD

Subscribers: arsenm, llvm-commits, mzolotukhin

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

llvm-svn: 276072
llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/insertion-point.ll