[PATCH] D66983: [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 17:17:33 PDT 2019


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

Although using `__builtin_shufflevector` and the `shufflevector`
instruction works fine, they are not opaque to the optimizer. As a
result, DAGCombine can potentially reduce the number of shuffles and
change the shuffle masks. This is unexpected behavior for users of the
WebAssembly SIMD intrinsics, so this CL solves the problem by adding a
new shuffle intrinsic that is opaque to the optimizers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66983

Files:
  clang/include/clang/Basic/BuiltinsWebAssembly.def
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/builtins-wasm.c
  llvm/include/llvm/IR/IntrinsicsWebAssembly.td
  llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  llvm/test/CodeGen/WebAssembly/simd-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66983.218001.patch
Type: text/x-patch
Size: 5992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190830/43622eff/attachment.bin>


More information about the llvm-commits mailing list