[PATCH] D83734: [WebAssembly] Lower vselect to v128.bitselect

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 23:33:55 PDT 2020


aheejin added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:161
+    // TODO: Implement SELECT_V128
+    for (auto Op : {ISD::SELECT_CC, ISD::SELECT})
       for (auto T : {MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v4f32, MVT::v2i64,
----------------
aheejin wrote:
> Maybe I don't remember the context very well, but I have some questions:
> 
> - Why were we expanding `ISD::VSELECT` until now, given that we had `v128.bitselect`?
> 
> - Maybe I don't remember the context, but why do we expand `ISD::SELECT`? [[ https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#bitwise-select | This ]] says
> > Note that the normal WebAssembly select instruction also works with vector types. It selects between two whole vectors controlled by a single scalar value, rather than selecting bits controlled by a control mask vector.
> Then can't we use wasm's `select` instruction for this?
> 
> - What is `SELECT_V128`?
Oh I now see Q2 is implemented in D83737.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83734





More information about the llvm-commits mailing list