RFR: 8375443: AVX-512: Disabling through UseSHA doesn't affect UseSHA3Intrinsics [v3]
Manuel Hässig
mhaessig at openjdk.org
Wed Jan 21 09:45:32 UTC 2026
On Sun, 18 Jan 2026 16:18:55 GMT, Ramkumar Sunderbabu <rsunderbabu at openjdk.org> wrote:
>> UseSHA flag is not respected while enabling/disabling UseSHA3Intrinsics flag in x86 builds.
>> Added UseSHA in the mix.
>>
>> Testing: Only Basic testing done. I will run more compiler related testing.
>
> Ramkumar Sunderbabu has updated the pull request incrementally with one additional commit since the last revision:
>
> whitespace issue fixed
Thank you for addressing my comments and adding a test. I have another suggestion regarding the test.
test/hotspot/jtreg/compiler/arguments/TestUseSHA3IntrinsicsWithUseSHADisabled.java line 31:
> 29: * @library /test/lib /
> 30: * @requires vm.flagless
> 31: * @requires os.arch == "amd64" | os.arch == "x86_64"
Suggestion:
* @requires os.simpleArch == "x64"
IIRC, this is the more reliable way to detect x86_64.
test/hotspot/jtreg/compiler/arguments/TestUseSHA3IntrinsicsWithUseSHADisabled.java line 32:
> 30: * @requires vm.flagless
> 31: * @requires os.arch == "amd64" | os.arch == "x86_64"
> 32: * @requires vm.cpu.features ~= ".*avx512f.*" & vm.cpu.features ~= ".*avx512bw.*"
It would be great to also test that the warning is emitted when `-XX:+UseSHA3Intrinsics` is passed, but is not supported by the CPU. You could remove this line and detect the features using `WHITE_BOX.getCPUFeatures()`.
-------------
Changes requested by mhaessig (Committer).
PR Review: https://git.openjdk.org/jdk/pull/29266#pullrequestreview-3683477539
PR Review Comment: https://git.openjdk.org/jdk/pull/29266#discussion_r2709416526
PR Review Comment: https://git.openjdk.org/jdk/pull/29266#discussion_r2709484685
More information about the hotspot-dev
mailing list