Stream: git-wasmtime

Topic: wasmtime / PR #6133 cranelift-interpreter: Fix incorrect ...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2023 at 14:13):

jan-justin opened PR #6133 from jan-justin:cranelift-interpreter-scalar-to-vector-wrong-result to bytecodealliance:main:

This PR attempts to address #5911.

The vectorizelanes function performs a check to see whether there is a single value provided in a given array, and if so returns it as a scalar.

While elsewhere in the interpreter this behaviour is relied upon, it yields an incorrect result when attempting to convert a scalar to a vector.

The original vectorizelanes remains untouched, however, an unconditional variant vectorizelanes_all has been added.

<!--

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 (Apr 02 2023 at 14:13):

jan-justin requested cfallin for a review on PR #6133.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2023 at 14:13):

jan-justin requested wasmtime-compiler-reviewers for a review on PR #6133.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2023 at 15:36):

jan-justin updated PR #6133.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 03 2023 at 07:28):

jan-justin edited PR #6133:

This PR attempts to address #5911.

The vectorizelanes function performs a check to see whether there is a single value provided in a given array, and if so returns it as a scalar.

While elsewhere in the interpreter this behaviour is relied upon, it yields an incorrect result when attempting to convert a scalar to a vector.

The original vectorizelanes remains untouched (in name and behaviorally), however, an unconditional variant vectorizelanes_all has been added.

<!--

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 (Apr 03 2023 at 16:11):

jameysharp requested afonso360 for a review on PR #6133.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 03 2023 at 17:22):

afonso360 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 03 2023 at 17:22):

afonso360 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 03 2023 at 17:22):

afonso360 created PR review comment:

It looks like we already have 2 runtest files for this opcode (simd-scalartovector.clif and simd-scalartovector-aarch64.clif). Maybe we should enable those for the interpreter, and add this input there (It looks like they don't cover a zero input).

I generally prefer (not sure about everyone else!) having the test files split by opcode so that it's easier to identify what we are testing.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 04 2023 at 07:22):

jan-justin updated PR #6133.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 04 2023 at 07:24):

jan-justin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 04 2023 at 07:24):

jan-justin created PR review comment:

That's valid. I spotted the tests but was unsure about whether or not to enable them.

I have added a case for a zero input in each file, so let me know if that is insufficient.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 04 2023 at 12:13):

afonso360 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 04 2023 at 12:13):

afonso360 created PR review comment:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 04 2023 at 12:53):

afonso360 merged PR #6133.


Last updated: Oct 23 2024 at 20:03 UTC