[all-commits] [llvm/llvm-project] 0d7286: [WebAssembly] Avoid scalarizing vector shifts in m...

Thomas Lively via All-commits all-commits at lists.llvm.org
Tue Jul 7 10:45:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0d7286a652371bca460357348f3b4828cd4ca214
      https://github.com/llvm/llvm-project/commit/0d7286a652371bca460357348f3b4828cd4ca214
  Author: Thomas Lively <tlively at google.com>
  Date:   2020-07-07 (Tue, 07 Jul 2020)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
    A llvm/test/CodeGen/WebAssembly/simd-shift-complex-splats.ll
    R llvm/test/CodeGen/WebAssembly/simd-shift-unroll.ll

  Log Message:
  -----------
  [WebAssembly] Avoid scalarizing vector shifts in more cases

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.

Differential Revision: https://reviews.llvm.org/D83278




More information about the All-commits mailing list