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 withbmask
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
or0
using eithericmp
orfcmp
, rendering this possible behavior ofbmask
redundant.Co-authored-by: Jamey Sharp <jsharp@fastly.com>
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
elliottt updated PR #5948 from trevor/bmask-simd
to main
.
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 withbmask
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
or0
using eithericmp
orfcmp
, rendering this possible behavior ofbmask
redundant. @jameysharp also points out that we can use a combination ofbmask
andsplat
to get similar behavior as well, so there are many ways to work aroundbmask
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.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
afonso360 submitted PR review.
elliottt merged PR #5948.
Last updated: Dec 23 2024 at 12:05 UTC