bjorn3 opened Issue #1429:
There is currently neither an encoding, nor a legalization for this instruction.
bjorn3 commented on Issue #1429:
I think it should be used by
translate_vector_icmp
andtranslate_vector_fcmp
after an encoding is added.
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
andtranslate_vector_fcmp
--it would be a separate instruction.
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
andtranslate_vector_fcmp
--it would be a separate instruction.
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 thaticmp
andfcmp
on vectors represent the resulting bool using all zeros / all ones. Otherwise theraw_bitcast
would fail. This is not guaranteed anywhere and for non vectors this assumption is wrong. Using egbmask.i8x16
to convert ab8x16
instead of usingraw_bitcast.i8x16
would avoid making this assumption.
abrown commented on Issue #1429:
As I understand it, on x86 and ARM the output of vector
icmp
andfcmp
is another vector with lanes of all zeroes or all ones. Are you suggesting usingbmask.i8x16
in
translate_vector_{icmp,fcmp}
to make things look more type-correct but actually encode it as a noop on those platforms?
abrown edited a comment on Issue #1429:
As I understand it, on x86 and ARM the output of vector
icmp
andfcmp
is another vector with lanes of all zeroes or all ones. Are you suggesting usingbmask.i8x16
intranslate_vector_{icmp,fcmp}
to make things look more type-correct but actually encode it as a noop on those platforms?
bjorn3 commented on Issue #1429:
Yes
bnjbvr labeled Issue #1429:
There is currently neither an encoding, nor a legalization for this instruction.
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>
- @bnjbvr
</details>
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Last updated: Nov 22 2024 at 17:03 UTC