[PATCH] D68531: [WebAssembly] Add builtin and intrinsic for v8x16.swizzle

Thomas Lively via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 4 18:02:19 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.

This clang builtin and corresponding LLVM intrinsic are necessary to
expose the exact semantics of the underlying WebAssembly instruction
to users. LLVM produces a poison value if the dynamic swizzle indices
are greater than the vector size, but the WebAssembly instruction sets
the corresponding output lane to zero. Users who depend on this
behavior can safely use this builtin.

Depends on D68527 <https://reviews.llvm.org/D68527>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68531

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/WebAssemblyInstrSIMD.td
  llvm/test/CodeGen/WebAssembly/simd-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68531.223348.patch
Type: text/x-patch
Size: 4904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191005/4fd8d0a9/attachment.bin>


More information about the cfe-commits mailing list