[PATCH] D53057: [WebAssembly] Handle undefined lane indices in SIMD patterns

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 12 15:21:46 PDT 2018


aheejin added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1032
+      // Lower undefs to zero
+      uint64_t MaskVal = Mask[I] == -1 ? 0 : (uint64_t)Mask[I] * LaneBytes + J;
+      Ops[OpIdx++] = DAG.getConstant(MaskVal, DL, MVT::i32);
----------------
aheejin wrote:
> Why -1? Is it how `undef` is represented?
I think `MaskVal` sounds confusing. It sounds like it is a mask value (such as 0xff). Can we change it to something else, like, just `Val` or something?


Repository:
  rL LLVM

https://reviews.llvm.org/D53057





More information about the llvm-commits mailing list