On Wed, 11 Oct 2023 20:58:23 GMT, Srinivas Vamsi Parasa <d...@openjdk.org> 
wrote:

>> The goal of this PR is to address the follow-up comments to the SIMD 
>> accelerated sort PR (#14227) which implemented AVX512 intrinsics for 
>> Arrays.sort() methods.
>> The proposed changes are:
>> 
>> 1) Restriction of the AVX512 sort acceleration to only Intel CPUs. A 
>> performance regression (due to micro-architectural differences) was reported 
>> for AMD Zen4 CPUs in the comments section of PR.
>> 2) Addressing the build failure due to a bug in GCC 12 (which was fixed in 
>> version 12.3.1). The details of the bug are at: 
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593
>> 3) Minor changes in Javadoc strings
>
> Srinivas Vamsi Parasa has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Revert @ForceInline annotations for small array sort methods

Proposed patch has one disadvantage: there's no way to override ergonomics 
decisions on AMD CPUs and forcibly enable the intrinsic without rebuilding the 
JVM. 

For many other intrinsics there are flags which enable finer grained control 
over JVM behavior (e.g., `UseVectorizedHashCodeIntrinsic`). There were some 
complaints that there are way to many individual flags to control intrinsics, 
so now there's `-XX:ControlIntrinsic=`, but as of now ergonomics doesn't rely 
on it to control what intrinsics are enabled/disabled.

It makes sense to let `-XX:ControlIntrinsic=` overrule `VM_Version::is_intel()` 
check and enable the intrinsics when `AVX512DQ` is supported.

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

PR Comment: https://git.openjdk.org/jdk/pull/16124#issuecomment-1758673497

Reply via email to