Page MenuHomePhabricator

[SLP]Do not reorder top nodes if they do not require reordering.
ClosedPublic

Authored by ABataev on Jan 6 2022, 10:35 AM.

Details

Summary

No need to reorder the top nodes, if they are not stores or
insertelement instructions and each node should be analized only
once, when the bottom-to-top analysis is performed.
We still endup with extractelements for the top node scalars and
the final shuffle just adds an extra cost and currently
crashes the compiler for PHI nodes.

Diff Detail

Event Timeline

ABataev created this revision.Jan 6 2022, 10:35 AM
ABataev requested review of this revision.Jan 6 2022, 10:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2022, 10:35 AM
RKSimon added inline comments.Jan 10 2022, 10:25 AM
llvm/test/Transforms/SLPVectorizer/X86/reordered-top-scalars.ll
3

Can this be pre-commited to show the diff?

ABataev added inline comments.Jan 10 2022, 10:29 AM
llvm/test/Transforms/SLPVectorizer/X86/reordered-top-scalars.ll
3

No, currently it crashes the compiler.

RKSimon accepted this revision.Jan 10 2022, 2:29 PM

OK - LGTM

This revision is now accepted and ready to land.Jan 10 2022, 2:29 PM

@ABataev Any blockers to this being committed?