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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 12 13:01:03 PST 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:20774
+
+  // The old shuffleneeds to go away.
+  if (!WideShuffleVector->hasOneUse())
----------------
"The old shuffle needs to go away."


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:20791
+  SmallVector<int, 16> NewMask;
+  NewMask.reserve(NumEltsExtracted);
+  SmallSetVector<std::pair<SDValue /*Op*/, int /*SubvectorIndex*/>, 2>
----------------
SmallVector<int> NewMask;


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:20793
+  SmallSetVector<std::pair<SDValue /*Op*/, int /*SubvectorIndex*/>, 2>
+      DemandedSubvectors;
+
----------------
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?


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