This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Avoid multiple attempts to vectorize CmpInsts.
ClosedPublic

Authored by ABataev on Apr 6 2021, 6:02 AM.

Details

Summary

No need to lookup through and/or try to vectorize operands of the
CmpInst instructions during attempts to find/vectorize min/max
reductions. Compiler implements postanalysis of the CmpInsts so we can
skip extra attempts in tryToVectorizeHorReductionOrInstOperands and save
compile time.

Diff Detail

Event Timeline

ABataev created this revision.Apr 6 2021, 6:02 AM
ABataev requested review of this revision.Apr 6 2021, 6:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2021, 6:02 AM
RKSimon retitled this revision from [SLP]Avoid mmultiple attempts to vectorize CmpInsts. to [SLP] Avoid multiple attempts to vectorize CmpInsts..Apr 6 2021, 6:22 AM
RKSimon accepted this revision.Apr 7 2021, 5:44 AM

LGTM with one (repeated) minor

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
7537–7538

Mention in comment we don't do this for CmpInst

7551

Mention in comment we don't do this for CmpInst

This revision is now accepted and ready to land.Apr 7 2021, 5:44 AM
This revision was automatically updated to reflect the committed changes.

It should just improve compile time, nothing else