[PATCH] D83606: [DAGCombiner][WebAssembly] Combine shuffles of more splat vals

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 19:10:30 PDT 2020


tlively created this revision.
tlively added reviewers: aheejin, dschuff, spatel.
Herald added subscribers: llvm-commits, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100.
Herald added a project: LLVM.

combineShuffleOfSplatVal previously only combined shuffles of splat
values that were themselves shuffles. This patch generalizes the
combine to also combine away shuffles of arbitrary splat values
recognized by SelectionDAG::isSplatValue, as long as doing so does not
create any new undefined lanes.

On the WebAssembly side, this patch also introduces a new custom
combine to remove undefined lanes from splatting
build_vectors. Without this extra combine, the new generic shuffle
combine would be inhibited on interesting cases such as the
shl_abs_add function in simd-shift-complex-splats.ll because it would
expose the undefined lanes.

Depends on D83605 <https://reviews.llvm.org/D83605>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83606

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  llvm/test/CodeGen/WebAssembly/simd-build-vector.ll
  llvm/test/CodeGen/WebAssembly/simd-shift-complex-splats.ll
  llvm/test/CodeGen/X86/vector-fshr-rot-256.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83606.277194.patch
Type: text/x-patch
Size: 9569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200711/51c69433/attachment.bin>


More information about the llvm-commits mailing list