[PATCH] D63529: [WebAssembly] Optimize ISel for SIMD Boolean reductions

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 16:32:09 PDT 2019


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

Converting the result *.{all,any}_true to a bool at the source level
generates LLVM IR that compares the result to 0. This check is
redundant since these instructions already return either 0 or 1 and
therefore conform to the BooleanContents setting for WebAssembly. This
CL adds patterns to detect and remove such redundant operations on the
result of Boolean reductions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63529

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
  llvm/test/CodeGen/WebAssembly/simd-reductions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63529.205467.patch
Type: text/x-patch
Size: 11772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190618/2d47cc9e/attachment-0001.bin>


More information about the llvm-commits mailing list