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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 13 06:18:42 PDT 2021


lebedev.ri added a comment.

In D104187#2815568 <https://reviews.llvm.org/D104187#2815568>, @RKSimon wrote:

> A few nits but the premise seems sound



> did you encounter real world cases that led you to this?

Not particularly, was just looking at the shuffle handling code and saw this.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19270
+  return std::distance(Range.begin(), I);
+}
+
----------------
RKSimon wrote:
> Move this inside reduceBuildVecToShuffle?
I actually want to pull this into STLExtras or something,
this seems like a common patter.


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