This is an archive of the discontinued LLVM Phabricator instance.

[SLP]Improve vectorization of split loads.
ClosedPublic

Authored by ABataev on Jul 30 2021, 10:59 AM.

Details

Summary

Need to fix ther cost estimation for split loads, since we look at the
subregs already, no need to permute them, need just to estimate
subregister insert, if it is smaller than the real register. Also, using
split loads, it might be profitable already to vectorize smaller trees
with gathering of the loads.

Diff Detail

Event Timeline

ABataev created this revision.Jul 30 2021, 10:59 AM
ABataev requested review of this revision.Jul 30 2021, 10:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 30 2021, 10:59 AM
RKSimon added inline comments.Jul 30 2021, 12:55 PM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
3883

What in particular needs fixing with SK_InsertSubvector ?

ABataev added inline comments.Jul 30 2021, 12:57 PM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
3883

In many cases X86 model fallbacks to the default (very pessimistic!) case and estimates it as extracts+gathers.

RKSimon added inline comments.Aug 2 2021, 4:27 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
3883

Does D107228 fix this or are there still issues?

ABataev added inline comments.Aug 2 2021, 5:35 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
3883

I'll check it later. Plus, need to fux a regression caused by thus patch, which I missed in the latest update.

ABataev updated this revision to Diff 368444.Aug 24 2021, 1:20 PM

Rebase + extract split loads handling from previously reverted patch.

vporpo added a subscriber: vporpo.Nov 11 2021, 8:00 PM
RKSimon accepted this revision.Nov 12 2021, 4:03 AM

LGTM

This revision is now accepted and ready to land.Nov 12 2021, 4:03 AM
This revision was automatically updated to reflect the committed changes.