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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 12 14:22:07 PDT 2021


lebedev.ri created this revision.
lebedev.ri added reviewers: RKSimon, mkuper, andreadb, spatel.
lebedev.ri added a project: LLVM.
Herald added subscribers: ecnelises, pengfei, hiraditya.
lebedev.ri requested review of this revision.

The sorting, obviously, must be stable, else we will have random assembly fluctuations.

Apparently there was no test coverage that would benefit from that,
so i've added one test.

The sorting consists of two parts - just sort the input vectors,
and recompute the shuffle mask -> input vector mapping.
I don't believe we need to do anything else.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104187

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/X86/oddshuffles.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104187.351685.patch
Type: text/x-patch
Size: 13834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210612/d11dc548/attachment.bin>


More information about the llvm-commits mailing list