[all-commits] [llvm/llvm-project] f8c5a4: [WebAssembly] Optimize out shift masks

Thomas Lively via All-commits all-commits at lists.llvm.org
Wed Jul 7 23:14:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8c5a4c67075877e1b6976bb7372aa96f02c11bc
      https://github.com/llvm/llvm-project/commit/f8c5a4c67075877e1b6976bb7372aa96f02c11bc
  Author: Thomas Lively <tlively at google.com>
  Date:   2021-07-07 (Wed, 07 Jul 2021)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
    A llvm/test/CodeGen/WebAssembly/masked-shifts.ll

  Log Message:
  -----------
  [WebAssembly] Optimize out shift masks

WebAssembly's shift instructions implicitly masks the shift count, so optimize
out redundant explicit masks of the shift count. For vector shifts, this
currently only works if the mask is applied before splatting the shift count,
but this should be addressed in a future commit. Resolves PR49655.

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




More information about the All-commits mailing list