[WebAssembly] SIMD integer min and max instructions
authorThomas Lively <tlively@google.com>
Thu, 31 Oct 2019 23:49:47 +0000 (16:49 -0700)
committerThomas Lively <tlively@google.com>
Fri, 1 Nov 2019 03:22:11 +0000 (20:22 -0700)
commita07019a275cd0deb59433ac59e4faa85d0722822
tree4991b5badd6d2ddbf8df61c238e500036a951906
parent10c1d0a452b561a9a0586e994f52066734316224
[WebAssembly] SIMD integer min and max instructions

Summary:
Introduces a clang builtins and LLVM intrinsics representing integer
min/max instructions. These instructions have not been merged to the
SIMD spec proposal yet, so they are currently opt-in only via builtins
and not produced by general pattern matching. If these instructions
are accepted into the spec proposal the builtins and intrinsics will
be replaced with normal pattern matching.

Defined in https://github.com/WebAssembly/simd/pull/27.

Reviewers: aheejin

Reviewed By: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D69696
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