[vectorIntrinsics] RFR: 8284459: Add x86 back-end implementation for LEADING and TRAILING ZEROS COUNT operations [v4]
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Thu Apr 21 00:53:51 UTC 2022
On Wed, 20 Apr 2022 21:27:37 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Summary of changes:
>> - Patch extends auto-vectorize to vectorize following Java SE APIs.
>> 1) Integer.numberOfLeadingZeros()
>> 2) Long.numberOfLeadingZeros()
>> 3) Integer.numberOfTrailingZeros()
>> 4) Long.numberOfTrailingZeros()
>>
>> - Adds optimized X86 backend implementation for VectorOperations.LEADING_ZERO_COUNT and VectorOperations.TRAILING_ZEROS_COUNT for AVX512 and legacy targets.
>>
>> Kindly review and share your feedback.
>>
>> Best Regards,
>> Jatin
>
> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
>
> - 8284459: Review comments resolution.
> - Merge branch 'vectorIntrinsics' of http://github.com/openjdk/panama-vector into JDK-8284459
> - 8284459: Adding auto-vectorizer and x86 backend support for TRAILING_ZERO_COUNT, also some code re-organization.
> - 8284459: Adding an exponent based leading zero count algorithm for integer vectors, its showing around 10-15% gain.
> - Merge branch 'vectorIntrinsics' of http://github.com/openjdk/panama-vector into JDK-8284459
> - 8284459: Add x86 back-end implementation for LEADING_ZERO_COUNT operation
I only have one comment remaining. We do auto-vectorize PopCountVL today. The masked support for auto-vectorized tail loop was added recently on mainline. So on masked path we should handle the conversion from long to int when the result type is int vector. Rest of the patch looks good to me. Please fix and integrate.
-------------
Marked as reviewed by sviswanathan (Committer).
PR: https://git.openjdk.java.net/panama-vector/pull/189
More information about the panama-dev
mailing list