This is an archive of the discontinued LLVM Phabricator instance.

[LSV] Don't assume that loads/stores appear in address order in the BB.
ClosedPublic

Authored by jlebar on Jul 19 2016, 2:19 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 64564.Jul 19 2016, 2:19 PM
jlebar retitled this revision from to [LSV] Don't assume that loads/stores appear in address order in the BB..
jlebar updated this object.
jlebar added a reviewer: asbirlea.
jlebar added subscribers: llvm-commits, arsenm.
asbirlea added inline comments.Jul 19 2016, 5:11 PM
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
455 ↗(On Diff #64564)

Nit: %s/OK/No[Interfering]Alias[Found]
Better yet, reverse the condition to AliasFound = false; and check below

if(AliasFound) ...
asbirlea accepted this revision.Jul 19 2016, 5:11 PM
asbirlea edited edge metadata.
This revision is now accepted and ready to land.Jul 19 2016, 5:11 PM
jlebar updated this revision to Diff 64622.Jul 19 2016, 5:58 PM
jlebar marked an inline comment as done.
jlebar edited edge metadata.

Rename 'OK' variable.

lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
455 ↗(On Diff #64564)

Much better, thanks.

This revision was automatically updated to reflect the committed changes.