[PATCH] D22686: [WASM] SIMD128 support.

João Porto via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 12:33:47 PDT 2016


jpp marked 3 inline comments as done.

================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:103
@@ -100,1 +102,3 @@
       return T;
+  if (Subtarget->hasSIMD128()) {
+    for (MVT T : {MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v4f32})
----------------
dschuff wrote:
> XXX Do we want to make this helper unconditionally return the SIMD type and put the Subtarget check elsewhere?
The new patch does not check for hasSIMD128 in non-instruction-selection related files.

================
Comment at: lib/Target/WebAssembly/WebAssemblyInstrCall.td:38
@@ +37,3 @@
+multiclass SIMD_CALL<ValueType vt, string prefix> {
+  let Predicates = [HasSIMD128] in {
+  def CALL_#vt : I<(outs V128:$dst), (ins i32imm:$callee, variable_ops),
----------------
dschuff wrote:
> Should the predicate go outside the multiclass?
I changed the SIMD instructions to be SIMD_I instead of plain I, and SIM_I Requires<[HasSIMD128]>;

================
Comment at: lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp:78
@@ +77,3 @@
+      if (!Subtarget.hasSIMD128())
+        break;
+    // fallthrough intended.
----------------
dschuff wrote:
> Should this be an assert instead?
not relevant anymore.


Repository:
  rL LLVM

https://reviews.llvm.org/D22686





More information about the llvm-commits mailing list