On Wed, 3 Jun 2026 02:19:30 GMT, Ashutosh Mehra <[email protected]> wrote:

>> This patch is reorganizing the code to split `get_processor_features()` into 
>> multiple helper functions. Details are present in the issue 
>> https://bugs.openjdk.org/browse/JDK-8380448.
>> It should not change the behavior of any VM flag, except 
>> `UseVectorizedHashCodeIntrinsic`. The earlier code always set 
>> `UseVectorizedHashCodeIntrinsic` to `true` if UseAVX >= 2. That means 
>> specifying `-XX:-UseVectorizedHashCodeIntrinsic` on command line wouldn't 
>> disable use of this intrinsic. This looks like a bug and has been fixed in 
>> this patch.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Ashutosh Mehra has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Fix setting of CopyAVX3Threshold
>   
>   Signed-off-by: Ashutosh Mehra <[email protected]>

Thank you, @ashu-mehra, for doing this refactoring.

I have few comments.

src/hotspot/cpu/x86/vm_version_x86.cpp line 1105:

> 1103:   // For AMD Processors use XMM/YMM MOVDQU instructions
> 1104:   // for Object Initialization as default
> 1105:   if (is_amd()) {

Do we need this? We are in `amd_config()`.

src/hotspot/cpu/x86/vm_version_x86.cpp line 1726:

> 1724: 
> 1725:   if (is_intel()) { // Intel cpus specific settings
> 1726:     if (is_knights_family()) {

I think we can combine checks into one condition here.

There  is separate issue not related to these changes which I realized by 
looking on this code.
`-XX:+UseKNLSetting` testing flag checks are guarded by `is_intel()`.
Our testing infra check `avx512` to run tests with this flag. Which worked 
before AMD implemented AVX512. Now we run tests on AMD with avx512 but CPU 
features are not disabled :(

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

PR Review: https://git.openjdk.org/jdk/pull/31301#pullrequestreview-4469706204
PR Review Comment: https://git.openjdk.org/jdk/pull/31301#discussion_r3389938744
PR Review Comment: https://git.openjdk.org/jdk/pull/31301#discussion_r3390046206

Reply via email to