[WebAssembly] Implement SIMD {i8x16,i16x8}.avgr_u instructions
authorThomas Lively <tlively@google.com>
Tue, 17 Dec 2019 21:58:39 +0000 (13:58 -0800)
committerThomas Lively <tlively@google.com>
Tue, 17 Dec 2019 23:05:50 +0000 (15:05 -0800)
commitf1b351e14a912dbb797b731807d81d4c9af4db0e
tree085e7e73d9c9f2b27cd6889a387714f2e7d5c53c
parentf827aff8598873194bccdfaf469f2dde7e5620d1
[WebAssembly] Implement SIMD {i8x16,i16x8}.avgr_u instructions

Summary:
These instructions were added to the spec proposal in
https://github.com/WebAssembly/simd/pull/126. Their semantics are
equivalent to `(a + b + 1) / 2`. The opcode for the experimental
i32x4.dot_i16x8_s is also bumped due to a collision with the
i8x16.avgr_u opcode.

Reviewers: aheejin

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71628
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
llvm/test/CodeGen/WebAssembly/simd-arith.ll
llvm/test/MC/WebAssembly/simd-encodings.s