[WebAssembly] SIMD shifts
authorThomas Lively <tlively@google.com>
Sat, 15 Sep 2018 00:45:31 +0000 (00:45 +0000)
committerThomas Lively <tlively@google.com>
Sat, 15 Sep 2018 00:45:31 +0000 (00:45 +0000)
commitf2550e0c445792f791cf8a752b1e4046f505cefc
tree1eff9bfebd347f28db295c60c74a8f00c27717d9
parent67f57c6795bf4943cf2c2481112e30acf80d95a2
[WebAssembly] SIMD shifts

Summary:
Implement shifts of vectors by i32. Since LLVM defines shifts as
binary operations between two vectors, this involves pattern matching
on splatted shift operands. For v2i64 shifts any i32 shift operands
have to be zero extended in the input and any i64 shift operands have
to be wrapped in the output. Depends on D52007.

Reviewers: aheejin, dschuff

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

Differential Revision: https://reviews.llvm.org/D51906

llvm-svn: 342302
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
llvm/test/CodeGen/WebAssembly/simd-arith.ll
llvm/test/MC/WebAssembly/simd-encodings.s