[PATCH] D95557: [WebAssembly] Prototype i8x16 to i32x4 widening instructions

Thomas Lively via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 10:49:09 PST 2021


tlively added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td:1279
+            (I32x4.vt (int_wasm_widen_signed
+              (I8x16.vt V128:$vec), (i32 timm:$idx))))],
+         "i32x4.widen_i8x16_s\t$dst, $vec, $idx",
----------------
aheejin wrote:
> I think this is the first time we use `timm` in this file... Haven't we used `LaneIdxN` for these? The same for `WIDEN_I8x16_TO_I32x4_U`.
Yes, this is the first use of `timm`. I needed to use `timm` instead of `imm` (or a `LaneIdxN`, which is just a restricted `imm`) because `immarg` arguments are apparently lowered to TargetConstant nodes rather than Constant nodes. This is also the first time I've used an `immarg` arument in one of the intrinsics, but I should definitely use them for many other intrinsics as well, and probably change `LaneIdxN` to be based on `timm` rather than `imm`. Since these are just prototype instructions, I am ok with them working differently from other instructions for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95557/new/

https://reviews.llvm.org/D95557



More information about the cfe-commits mailing list