This is an archive of the discontinued LLVM Phabricator instance.

[SLP]Do not represent splats as node with the reused scalars.
ClosedPublic

Authored by ABataev on Dec 15 2021, 6:06 AM.

Details

Summary

No need to represent splats as a node with the reused scalars, it may
increase the cost (currently pass just ignores extra shuffle cost and it
is still not correct).

Diff Detail

Event Timeline

ABataev created this revision.Dec 15 2021, 6:06 AM
ABataev requested review of this revision.Dec 15 2021, 6:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2021, 6:06 AM
RKSimon added inline comments.Dec 15 2021, 6:12 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
4739

Is this a separate fix?

ABataev added inline comments.Dec 15 2021, 6:14 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
4739

Same, but actually there should not be a difference between VecTy and FinalVecTy. Probably, better to add the assert here.

ABataev updated this revision to Diff 394546.Dec 15 2021, 6:17 AM

Added the assertion.

RKSimon accepted this revision.Dec 15 2021, 6:32 AM

LGTM

This revision is now accepted and ready to land.Dec 15 2021, 6:32 AM
This revision was landed with ongoing or failed builds.Dec 15 2021, 6:50 AM
This revision was automatically updated to reflect the committed changes.