[PATCH] D83734: [WebAssembly] Lower vselect to v128.bitselect
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 15 21:12:15 PDT 2020
aheejin accepted this revision.
aheejin added inline comments.
This revision is now accepted and ready to land.
================
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,
----------------
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`?
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