This is an archive of the discontinued LLVM Phabricator instance.

[SLP]Improve operands kind analaysis for constants.
ClosedPublic

Authored by ABataev on Aug 29 2022, 1:49 PM.

Details

Summary

Removed EnableFP parameter in getOperandInfo function since it is not
needed, the operands kinds also controlled by the operation code, which
allows to remove extra check for the type of the operands. Also, added
analysis for uniform constant float values.

This change currently does not trigger any changes in the code since TTI
does not do analysis for constant floats, so it can be considered NFC.
Tested with llvm-test-suite + SPEC2017, no changes.

Diff Detail

Event Timeline

ABataev created this revision.Aug 29 2022, 1:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2022, 1:49 PM
ABataev requested review of this revision.Aug 29 2022, 1:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2022, 1:49 PM
reames accepted this revision.Aug 29 2022, 2:00 PM
This revision is now accepted and ready to land.Aug 29 2022, 2:00 PM
vdmitrie added inline comments.Aug 29 2022, 2:22 PM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
5833

I believe this meant to be "!=".

reames added inline comments.Aug 29 2022, 2:48 PM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
5833

Good catch! Yes, it should be.

ABataev updated this revision to Diff 456472.Aug 29 2022, 3:07 PM

Address comment

vdmitrie accepted this revision.Aug 29 2022, 3:28 PM

Looks good

This revision was landed with ongoing or failed builds.Aug 30 2022, 6:36 AM
This revision was automatically updated to reflect the committed changes.