This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Support scalable splats in U(ADD|SUB)SAT combines
ClosedPublic

Authored by frasercrmck on Jul 23 2021, 4:49 AM.

Details

Summary

This patch builds on top of D106575 in which scalable-vector splats were
supported in ISD::matchBinaryPredicate. It teaches the DAGCombiner how
to perform a variety of the pre-existing saturating add/sub combines on
scalable-vector types.

Diff Detail

Event Timeline

frasercrmck created this revision.Jul 23 2021, 4:49 AM
frasercrmck requested review of this revision.Jul 23 2021, 4:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2021, 4:49 AM
frasercrmck added inline comments.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
10053

I was wondering whether now's the time to add yet another function like ISD::isBuildVectorOrSplatVector. Thoughts?

craig.topper added inline comments.Jul 23 2021, 10:15 AM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
10109

Do the opcodes need to match here?

ensure matching opcodes

This revision is now accepted and ready to land.Jul 26 2021, 12:07 PM

rebase (arcanist lost track)

This revision was landed with ongoing or failed builds.Jul 27 2021, 3:01 AM
This revision was automatically updated to reflect the committed changes.