Stream: git-wasmtime

Topic: wasmtime / PR #5948 Stop supporting vectors with `bmask`


view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2023 at 01:36):

elliottt opened PR #5948 from trevor/bmask-simd to main:

The bmask instruction does not have a lowering in any backend that will produce a vector result, but the opcode constraints indicate that it is possible to produce a vector. Any attempt to produce a vector with bmask currently yields a panic, so this PR avoids that by rejecting these cases in the verifier instead.

Additionally, it's possible to produce a vector of comparison results whose lanes will be all 1 or 0 using either icmp or fcmp, rendering this possible behavior of bmask redundant.

Co-authored-by: Jamey Sharp <jsharp@fastly.com>

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2023 at 01:36):

elliottt updated PR #5948 from trevor/bmask-simd to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2023 at 01:38):

elliottt edited PR #5948 from trevor/bmask-simd to main:

The bmask instruction does not have a lowering in any backend that will produce a vector result, but the opcode constraints indicate that it is possible to produce a vector. Any attempt to produce a vector with bmask currently yields a panic, so this PR avoids that by rejecting these cases in the verifier instead.

Additionally, it's possible to produce a vector of comparison results whose lanes will be all 1 or 0 using either icmp or fcmp, rendering this possible behavior of bmask redundant. @jameysharp also points out that we can use a combination of bmask and splat to get similar behavior as well, so there are many ways to work around bmask not supporting vector results.

Co-authored-by: Jamey Sharp <jsharp@fastly.com>

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2023 at 12:02):

afonso360 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2023 at 18:14):

elliottt merged PR #5948.


Last updated: Dec 23 2024 at 12:05 UTC