[PATCH] D105600: [WebAssembly] Optimize out shift masks

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 7 16:57:51 PDT 2021


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

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105600

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td
  llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
  llvm/test/CodeGen/WebAssembly/masked-shifts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105600.357106.patch
Type: text/x-patch
Size: 21811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210707/6804c518/attachment.bin>


More information about the llvm-commits mailing list