[WebAssembly] Update SIMD binary arithmetic

Add missing SIMD types (v2f64) and binary ops. Also adds
tablegen support for automatically prepending prefix byte to SIMD
opcodes.

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

Patch by Thomas Lively

llvm-svn: 339186
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
index 7d1edcc..5ff0ecb 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
@@ -12,8 +12,19 @@
 ///
 //===----------------------------------------------------------------------===//
 
-let isCommutable = 1 in {
-defm ADD : SIMDBinary<add, fadd, "add ">;
-defm MUL: SIMDBinary<mul, fmul, "mul ">;
-} // isCommutable = 1
-defm SUB: SIMDBinary<sub, fsub, "sub ">;
+let Defs = [ARGUMENTS] in {
+
+let isCommutable = 1 in
+defm ADD : SIMDBinaryInt<add, "add ", 24>;
+defm SUB : SIMDBinaryInt<sub, "sub ", 28>;
+let isCommutable = 1 in
+defm MUL : SIMDBinaryInt<mul, "mul ", 32>;
+
+let isCommutable = 1 in
+defm ADD : SIMDBinaryFP<fadd, "add ", 122>;
+defm SUB : SIMDBinaryFP<fsub, "sub ", 124>;
+defm DIV : SIMDBinaryFP<fdiv, "div ", 126>;
+let isCommutable = 1 in
+defm MUL : SIMDBinaryFP<fmul, "mul ", 128>;
+
+} // Defs = [ARGUMENTS]