This is an archive of the discontinued LLVM Phabricator instance.

[LV] Remove what seems like stale code in collectElementTypesForWidening.
ClosedPublic

Authored by sdesmalen on Dec 8 2021, 8:44 AM.

Details

Summary

This was originally added in rG22174f5d5af1eb15b376c6d49e7925cbb7cca6be
although that patch doesn't really mention any reasons for ignoring the
pointer type in this calculation if the memory access isn't consecutive.

Diff Detail

Event Timeline

sdesmalen created this revision.Dec 8 2021, 8:44 AM
sdesmalen requested review of this revision.Dec 8 2021, 8:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2021, 8:44 AM
david-arm accepted this revision.Jan 4 2022, 7:05 AM

LGTM. I don't see why we should be treating stores/loads involving 64-bit pointers any different to normal 64-bit values. Furthermore, there are no existing tests defending the case where VF>1, which suggests the removed code has little value. If we have an accurate cost model that reflects the cost of scalarising gathers/scatters then that should ensure a sensible choice of interleave count.

This revision is now accepted and ready to land.Jan 4 2022, 7:05 AM
nikic added a subscriber: nikic.Jan 5 2022, 11:59 PM
nikic added inline comments.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
5993

Can this be an assertion? The load/store type can't be unsized, and I assume a reduction type can't be unsized either?

sdesmalen added inline comments.Jan 6 2022, 2:40 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
5993

It can, thanks for the suggestion. Are you happy with me pushing this change directly?

nikic added inline comments.Jan 6 2022, 2:46 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
5993

Sure.