Stream: git-wasmtime

Topic: wasmtime / Issue #1429 Cranelift: implement bmask instruc...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 15:32):

bjorn3 opened Issue #1429:

There is currently neither an encoding, nor a legalization for this instruction.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 15:46):

bjorn3 commented on Issue #1429:

I think it should be used by translate_vector_icmp and translate_vector_fcmp after an encoding is added.

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

abrown commented on Issue #1429:

Not sure I follow: I do plan to evenually add a SIMD bitmask using PMOVMSKB like what is described in the SIMD spec issue but I don't see how that would change translate_vector_icmp and translate_vector_fcmp--it would be a separate instruction.

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

abrown edited a comment on Issue #1429:

Not sure I follow: I do plan to eventually add a SIMD bitmask using PMOVMSKB like what is described in the SIMD spec issue but I don't see how that would change translate_vector_icmp and translate_vector_fcmp--it would be a separate instruction.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 21:25):

bjorn3 commented on Issue #1429:

According to the docs the instruction would for every lane return an all ones integer for a true bool and an all zeros integer for a false bool. Eg bmask.i8x2 on [false, true] would return [0x00, 0xff].

translate_vector_{icmp,fcmp} currently assume that icmp and fcmp on vectors represent the resulting bool using all zeros / all ones. Otherwise the raw_bitcast would fail. This is not guaranteed anywhere and for non vectors this assumption is wrong. Using eg bmask.i8x16 to convert a b8x16 instead of using raw_bitcast.i8x16 would avoid making this assumption.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 21:45):

abrown commented on Issue #1429:

As I understand it, on x86 and ARM the output of vector icmp and fcmp is another vector with lanes of all zeroes or all ones. Are you suggesting using bmask.i8x16 in
translate_vector_{icmp,fcmp} to make things look more type-correct but actually encode it as a noop on those platforms?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 21:46):

abrown edited a comment on Issue #1429:

As I understand it, on x86 and ARM the output of vector icmp and fcmp is another vector with lanes of all zeroes or all ones. Are you suggesting using bmask.i8x16 in translate_vector_{icmp,fcmp} to make things look more type-correct but actually encode it as a noop on those platforms?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 28 2020 at 22:06):

bjorn3 commented on Issue #1429:

Yes

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2020 at 09:57):

bnjbvr labeled Issue #1429:

There is currently neither an encoding, nor a legalization for this instruction.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2020 at 09:57):

github-actions[bot] commented on Issue #1429:

Subscribe to Label Action

This issue or pull request has been labeled: "cranelift"

<details> <summary>Users Subscribed to "cranelift"</summary>

</details>

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.


Last updated: Nov 22 2024 at 17:03 UTC