[PATCH] D104156: [DAGCombine][X86][ARM] EXTRACT_SUBVECTOR(VECTOR_SHUFFLE(?,?,Mask)) -> VECTOR_SHUFFLE(EXTRACT_SUBVECTOR(?, ?), EXTRACT_SUBVECTOR(?, ?), Mask')

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 12 13:11:45 PST 2021


lebedev.ri added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:20793
+  SmallSetVector<std::pair<SDValue /*Op*/, int /*SubvectorIndex*/>, 2>
+      DemandedSubvectors;
+
----------------
RKSimon wrote:
> I'm torn whether you need the complexity of a set here - is the code that much worse if you manually handle 2 x SDValue/int variables?
I'm not sure how this can be done without a set,
we need something set-like for this,
there could be from 0 to 2 subvectors.

It could be a linear search over a vector,
but i don't think there is a such container in ADT?
(there's `SmartSmallSetVector` in `lang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp`)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104156/new/

https://reviews.llvm.org/D104156



More information about the llvm-commits mailing list