[VectorAPI] Expose direct move mask operation?
Zhu, Yifan
yzhu104 at UR.Rochester.edu
Sat Jan 7 00:01:05 UTC 2023
Sorry if this was previously discussed. I am new to the list.
With current API, it seems that if one want to get the lanes with highest bit set, one can use Vector::compare(LT, 0). In the backend, this seems to be translated to something like vpcmpgtb followed by vpmovmskb. However, Gather the highest bit on x86 only need a movemask operation.
* I wonder if such operations can be optimized if the given constant is special (such as 0)
* Or if we can finally have a gatherBits() operation. I know that movemask operations are not available on platforms like aarch64, but libraries like SIMDE has given some examples on how to emulate these operations on other platforms.
[cid:825d375d-909d-4f47-b90f-c786e3c116ab]
Schrodinger ZHU Yifan, Ph.D. Student
Computer Science Department, University of Rochester
Personal Email: i at zhuyi.fan
Work Email: yifanzhu at rochester.edu
Website: https://www.cs.rochester.edu/~yzhu104/Main.html
Github: SchrodingerZhu
GPG Fingerprint: BA02CBEB8CB5D8181E9368304D2CC545A78DBCC3
[cid:aa2cc978-4bb6-445c-aa58-573900b2a081]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20230107/cd5f5e05/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-xogqddxa.png
Type: image/png
Size: 19680 bytes
Desc: Outlook-xogqddxa.png
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20230107/cd5f5e05/Outlook-xogqddxa-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-5pf0lgg3
Type: image/svg+xml
Size: 41432 bytes
Desc: Outlook-5pf0lgg3
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20230107/cd5f5e05/Outlook-5pf0lgg3-0001.svg>
More information about the panama-dev
mailing list