Stream: git-wasmtime

Topic: wasmtime / PR #6070 Restrict the types for isplit and ico...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2023 at 17:15):

elliottt opened PR #6070 from trevor/restrict-isplit-iconcat to main:

All backends currently assume that isplit and iconcat only work for splitting i128 values, or concatenating two i64 values to make an i128 value. This PR changes the instruction definition to reflect that assumption.
<!--

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 20 2023 at 17:16):

elliottt has marked PR #6070 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2023 at 17:23):

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2023 at 17:24):

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2023 at 17:24):

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2023 at 17:39):

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2023 at 17:40):

elliottt edited PR #6070 from trevor/restrict-isplit-iconcat to main:

All backends currently assume that isplit and iconcat only work for splitting i128 values, or concatenating two i64 values to make an i128 value. This PR changes the instruction definition to reflect that assumption.

This PR makes the HalfWidth and DoubleWidth constraints never constructed, but I think we should leave these two constructors marked #[allow(unused)] rather than remove them, as we might want to relax the constraints on isplit and iconcat in the future.
<!--

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 20 2023 at 17:46):

elliottt edited PR #6070 from trevor/restrict-isplit-iconcat to main:

All backends currently assume that isplit and iconcat only work for splitting i128 values, or concatenating two i64 values to make an i128 value. This PR changes the instruction definition to reflect that assumption.

This PR makes the HalfWidth and DoubleWidth constraints never constructed as the uses of those constraints in the instruction DSL now produces singleton sets. However, I think we should leave these two constructors marked #[allow(unused)] rather than remove them, as we might want to relax the constraints on isplit and iconcat in the future.
<!--

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 20 2023 at 17:59):

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2023 at 21:16):

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

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

elliottt edited PR #6070 from trevor/restrict-isplit-iconcat to main:

All backends currently assume that isplit and iconcat only work for splitting i128 values, or concatenating two i64 values to make an i128 value. The type constraints for bot indicate that they can work over vectors as well as other bit-width integers. This PR resolves part of this discrepancy by removing vector support from both isplit and iconcat.
<!--

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 20 2023 at 22:34):

elliottt edited PR #6070 from trevor/restrict-isplit-iconcat to main:

All backends currently assume that isplit and iconcat only work for splitting i128 values, or concatenating two i64 values to make an i128 value. The type constraints for both indicate that they can work over vectors as well as other bit-width integers. This PR resolves part of this discrepancy by removing vector support from both isplit and iconcat.
<!--

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 20 2023 at 23:56):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2023 at 23:56):

jameysharp created PR review comment:

The other place that NarrowInt is used is for iconst. I recently asked Chris about whether we should be making use of iconst's documented ability to construct a vector, and he was surprised that it was documented that way. Perhaps we should just remove simd_lanes from the original definition of NarrowInt instead of shadowing it here?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2023 at 00:13):

elliottt submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2023 at 00:13):

elliottt created PR review comment:

Happy to make that change as well.

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

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2023 at 00:15):

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

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

jameysharp submitted PR review.

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

jameysharp created PR review comment:

Apparently a couple of parser filetests use iconst with vector types, but since they're only testing the parser I don't think we should take that as a sign that this is actually used.

In rewrite.clif I think you can just change it to an iconst.i32. Or possibly delete the test in question entirely, because I don't think it's testing anything related to what the file-header comment claims to be testing.

In tiny.clif I guess the test is only supposed to check that the parser can parse lane indexes for extractlane and insertlane. Making v0 be an i32x4 parameter instead of the result of an iconst should do that just as well, I think.

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

elliottt updated PR #6070 from trevor/restrict-isplit-iconcat to main.

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

jameysharp submitted PR review.

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

elliottt merged PR #6070.


Last updated: Nov 22 2024 at 17:03 UTC