[PATCH] D140811: [DAGCombiner][X86] `visitVECTOR_SHUFFLE()`: splats with a single non-undef element are not splats
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 31 13:52:45 PST 2022
RKSimon added a comment.
Cheers - I'll review the x86 diffs and get back to you
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:23792
+ // might be free. But only if there are at least two non-undef indices.
+ if (OtherSVN->isSplat() &&
+ count(OtherSVN->getMask(), OtherSVN->getSplatIndex()) > 1)
----------------
Instead of the count() - it might be worth adding a bool arg to isSplat()/isSplatMask() to only match splats with more than a single matching element?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140811/new/
https://reviews.llvm.org/D140811
More information about the llvm-commits
mailing list