This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Support all-ones/all-zeros SPLAT_VECTOR in more combines
ClosedPublic

Authored by frasercrmck on Apr 20 2021, 6:42 AM.

Details

Summary

This patch adds incrementally-better support for SPLAT_VECTOR in a
handful of vector combines by changing a few more
isBuildVectorAllOnes/isBuildVectorAllZeros to the equivalent
isConstantSplatVectorAllOnes/Zeros calls.

Diff Detail

Event Timeline

frasercrmck created this revision.Apr 20 2021, 6:42 AM
frasercrmck requested review of this revision.Apr 20 2021, 6:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2021, 6:42 AM
frasercrmck added inline comments.Apr 20 2021, 6:44 AM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
10053–10054

I wasn't sure if I should reword this comment. Unsure how it could be done without just making it more verbose.

paulwalker-arm accepted this revision.Apr 20 2021, 7:14 AM
paulwalker-arm added inline comments.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
10053–10054

Perhaps just drop build_vector?

This revision is now accepted and ready to land.Apr 20 2021, 7:14 AM
  • update comment according to feedback
frasercrmck marked an inline comment as done.Apr 20 2021, 8:16 AM
frasercrmck added inline comments.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
10053–10054

Aye that looks pretty good, thanks.

frasercrmck marked an inline comment as done.
  • rebase
  • update SVE test case to account for optimizations