[PATCH] D111227: [WebAssembly] Implementation of table.grow/size and ref.null intrinsics

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 14 23:54:37 PDT 2021


pmatos added a comment.

In D111227#3046551 <https://reviews.llvm.org/D111227#3046551>, @tlively wrote:

> In D111227#3045279 <https://reviews.llvm.org/D111227#3045279>, @pmatos wrote:
>
>> - As far as I understand intrinsics cannot be polymorphic, therefore `table.grow` and `ref.null` intrinsics come in two versions: one for `externref` and one for `funcref`.
>
> Intrinsics actually can be polymorphic. For an example, see the definition of `int_wasm_sub_sat_signed`, which is polymorphic over all vector types (although not all vector types are actually supported in the backend). I don't know how much work it would be to support that kind of polymorphism for reference types, though.

You mean the polymorphism achieve through `llvm_anyvector_ty`? So I guess the way to go about it would be to try to add a `wasm_anyreftype_ty`... I will take a look.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111227



More information about the llvm-commits mailing list