[PATCH] D53542: [WebAssembly] Set LoadExt and TruncStore actions for SIMD types

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 16:31:31 PDT 2018


aheejin added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:177
   //  - i1 extending loads.
+  //  - any extending/truncating SIMD loads/stores
   setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f32, Expand);
----------------
Real nit: Maybe we don't need 'any'


================
Comment at: lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:186
+                   MVT::v2f64})
+      for (auto MemT : MVT::vector_valuetypes())
+        if (MVT(T) != MemT) {
----------------
- What happens if `T` and `MVT` have different number of elements? (v16i8 vs. v64i2)
- What happens if they have the same number of elements but the size of vectors are different? (v16i8 vs. v16i16)
- What if both of these are true? (v16i8 vs. v64i16)


================
Comment at: lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:191
+            setLoadExtAction(Ext, T, MemT, Expand);
+        }
+  }
----------------
Style nit: add {} to the outer for loops too in case an inner block has {} aleady?


Repository:
  rL LLVM

https://reviews.llvm.org/D53542





More information about the llvm-commits mailing list