-
Notifications
You must be signed in to change notification settings - Fork 402
Add vblend vector operation #7729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
gita-omr
commented
Apr 15, 2025
•
edited
Loading
edited
- similar to vbitselect but works on lanes and under control of the mask (third child)
- if lane is not set in the mask the value from the first vector is chosen
- the lane from the second vector is chosen otherwise
Jenkins build all |
Fixed build errors. |
Jenkins build all |
RISC build failed due to unrelated reasons (machine is offline). |
What is the type and semantics of the "mask" child? i.e., how does it describe how the the first and second children are blended? |
All three arguments have the same number of elements. Mask element is a boolean value. If it's true, corresponding element of the first vector is chosen. If it's false, element from the second argument is chosen. |
Actually, it's a good question. Let me think what the exact semantic should be. |
What is
If this is meant to be analogous to |
- similar to vbitselect but works on lanes and under control of the mask (third child) - if lane is not set in the mask the value from the first vector is chosen - the lane from the second vector is chosen otherwise
Updated with expected semantics. |
We have |
I see. It's unfortunate that the order of the operands differs from those of |
Thanks for doing this @gita-omr. Did you find out the reason that the vbitselect opcode had a strange extra operand? |
This is a common meaning for vector blend operations and that's how corresponding instructions work at least on Intel ans Power. Essentially, we blend second vector into the first one based on the third vector or mask. |