[WebAssembly] Implement SIMD signselect instructions
authorThomas Lively <tlively@google.com>
Thu, 29 Oct 2020 18:06:20 +0000 (11:06 -0700)
committerThomas Lively <tlively@google.com>
Thu, 29 Oct 2020 18:06:20 +0000 (11:06 -0700)
commitbe6f50798e79336cdfd8fe464f37d41ac135640d
tree72b2345154525b57386abe5d9454acc6c0adf9e3
parentbffdc241a62e0084040466330243e3a9ee251f3a
[WebAssembly] Implement SIMD signselect instructions

As proposed in https://github.com/WebAssembly/simd/pull/124, using the opcodes
adopted by V8 in
https://chromium-review.googlesource.com/c/v8/v8/+/2486235/2/src/wasm/wasm-opcodes.h.
Uses new builtin functions and a new target intrinsic exclusively to ensure that
the new instructions are only emitted when a user explicitly opts in to using
them since they are still in the prototyping and evaluation phase.

Differential Revision: https://reviews.llvm.org/D90357
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
llvm/test/MC/WebAssembly/simd-encodings.s