[PATCH] D83278: [WebAssembly] Avoid scalarizing vector shifts in more cases

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 22:44:56 PDT 2020


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

Since WebAssembly's vector shift instructions take a scalar shift
amount rather than a vector shift amount, we have to check in ISel
that the vector shift amount is a splat. Previously, we were checking
explicitly for splat BUILD_VECTOR nodes, but this change uses the
standard utilities for detecting splat values that can handle more
complex splat patterns. Since the C++ ISel lowering is now more
general than the ISel patterns, this change also simplifies shift
lowering by using the C++ lowering for all SIMD shifts rather than
mixing C++ and normal pattern-based lowering.

This change improves ISel for shifts to the point that the
simd-shift-unroll.ll regression test no longer tests the code path it
was originally meant to test. The bug corresponding to that regression
test is no longer reproducible with its original reported reproducer,
so rather than try to fix the regression test, this change just
removes it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83278

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
  llvm/test/CodeGen/WebAssembly/simd-shift-complex-splats.ll
  llvm/test/CodeGen/WebAssembly/simd-shift-unroll.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83278.275907.patch
Type: text/x-patch
Size: 13519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200707/b3a1c3e7/attachment.bin>


More information about the llvm-commits mailing list