This is an archive of the discontinued LLVM Phabricator instance.

[SLP]Improve splats vectorization.
ClosedPublic

Authored by ABataev on Jul 29 2021, 2:09 PM.

Details

Summary

Replace insertelement instructions for splats with just single
insertelement + broadcast shuffle. Also, try to merge these instructions
if they come from the same/shuffled gather node.

Diff Detail

Event Timeline

ABataev created this revision.Jul 29 2021, 2:09 PM
ABataev requested review of this revision.Jul 29 2021, 2:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2021, 2:09 PM
RKSimon added inline comments.Jul 30 2021, 2:58 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
5542–5543

What is the meaning behind this comment? Do you have examples where an identity (I guess <val0,undef,undef,undef> ?) hasn't been removed and has to be treated as a splat?

ABataev added inline comments.Jul 30 2021, 3:02 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
5542–5543

I do not remember what does it mean ,most prpbably need to remove it.

RKSimon accepted this revision.Jul 30 2021, 7:07 AM

LGTM - cheers

This revision is now accepted and ready to land.Jul 30 2021, 7:07 AM
fhahn accepted this revision.Jul 30 2021, 7:18 AM

LGTM, thanks for working on this!

This revision was automatically updated to reflect the committed changes.