[PATCH] D104187: [DAGCombine] reduceBuildVecToShuffle(): sort input vectors by decreasing size

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 13 07:41:20 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19270
+  return std::distance(Range.begin(), I);
+}
+
----------------
lebedev.ri wrote:
> RKSimon wrote:
> > Move this inside reduceBuildVecToShuffle?
> I actually want to pull this into STLExtras or something,
> this seems like a common patter.
SGTM - but until then moving it inside reduceBuildVecToShuffle is still probably cleaner - maybe add a TODO comment?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104187



More information about the llvm-commits mailing list