[vectorIntrinsics] RFR: 8284459: Add x86 back-end implementation for LEADING_ZEROS_COUNT operation

Quan Anh Mai duke at openjdk.java.net
Thu Apr 7 12:09:04 UTC 2022


On Thu, 7 Apr 2022 07:30:24 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

> Summary of changes:
> - Patch extends SLP vectorizer to auto-vectorize Integer.numberOfLeadingZeros() and Long.numberOfLeadingZeros() APIs.
> - Adds optimized target feature specific X86 backend implementation for LEADING_ZEROS_COUNT operation for all integral types. 
> 
> Kindly review and share your feedback.
> 
> Best Regards,
> Jatin

Hi, for int vectors, I think you could convert it to float and look at the exponent part. For long vectors, the results can be obtained by counting each half and combined together. Thanks.

-------------

PR: https://git.openjdk.java.net/panama-vector/pull/189


More information about the panama-dev mailing list