RFR: 8293484: AArch64: TestUseSHA512IntrinsicsOptionOnSupportedCPU.java fails on CPU with SHA512 feature support

Ramkumar Sunderbabu rsunderbabu at openjdk.org
Tue Nov 11 07:19:02 UTC 2025


On Wed, 5 Nov 2025 03:33:15 GMT, Hao Sun <haosun at openjdk.org> wrote:

>> We have a host of tests under test/hotspot/jtreg/compiler/intrinsics/sha which checks if the SHA intrinsics flags' enable/disable setting is in sync with CPU support in the underlying platform. There might be situations where the intrinsics might not be enabled despite the hardware supporting the relevant instructions. For example, there might be reliability issues or performance issues. In such situations, the tests will fail.
>> 
>> Till now, the approach has been to exclude the platforms where the support is yet to be provided and remove the exclusion after. This necessitates additional work on the test front.
>> 
>> A more compact design would be make predicate probes to rely on intrinsics availability in the platform as opposed to hardware support availability. The migration to intrinsics availability would especially help update releases where feature backport might not be complete.
>> 
>> PS: This fix can/should be propagated to other such tests as well. Once this PR gets approval, I will work on similar tests.
>
> Hi, I suppose the failure may occur if we run this test case on CPU **with** SHA512 feature, but **disabling** SHA512Intrinsics.
> 
> As **@requires vm.flagless** is set in this jtreg case, if we specify `-XX:-UseSHA512Intrinsics`, this test case is not tested actually. Here shows the log in my machine.
> 
> 
> $ make test TEST=test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java JTREG="VM_OPTIONS=-XX:-UseSHA512Intrinsics"
> Building target 'test' in configuration '/tmp/local-build-fastdebug'
> Running tests using JTREG control variable 'VM_OPTIONS=-XX:-UseSHA512Intrinsics'
> Test selection 'test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java', will run:
> * jtreg:test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java
> Clean up dirs for jtreg_test_hotspot_jtreg_compiler_intrinsics_sha_cli_TestUseSHA512IntrinsicsOptionOnSupportedCPU_java
> 
> Running test 'jtreg:test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java'
> Test results: no tests selected
> Report written to /tmp/local-build-fastdebug/test-results/jtreg_test_hotspot_jtreg_compiler_intrinsics_sha_cli_TestUseSHA512IntrinsicsOptionOnSupportedCPU_java/html/report.html
> Results written to /tmp/local-build-fastdebug/test-support/jtreg_test_hotspot_jtreg_compiler_intrinsics_sha_cli_TestUseSHA512IntrinsicsOptionOnSupportedCPU_java
> Finished running test 'jtreg:test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java'
> Test report is stored in /tmp/local-build-fastdebug/test-results/jtreg_test_hotspot_jtreg_compiler_intrinsics_sha_cli_TestUseSHA512IntrinsicsOptionOnSupportedCPU_java
> 
> ==============================
> Test summary
> ==============================
>    TEST                                              TOTAL  PASS  FAIL ERROR  SKIP   
>    jtreg:test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java
>                                                          0     0     0     0     0   
> ==============================
> TEST SUCCESS
> 
> 
> If so, I don't think it's a bug.
> Is there anything I misunderstood?

@shqking -XX:-UseSHA512Intrinsics is not the only case of disabling SHA512 instrinsics. Please have a look at your comment https://bugs.openjdk.org/browse/JDK-8293484?focusedId=14532743&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14532743
Intrinsics was disabled due to lack of test hardware. Please refer @snazarkin comment too. https://bugs.openjdk.org/browse/JDK-8293484?focusedId=14522406&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14522406

I have come across instances where the support was temporarily disabled due to performance issue or reliability issue.
Relying on the CPU feature is not a bug per se. But it makes test code maintenance a tad bit difficult.
I have discussed this in detail under PR description.

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

PR Comment: https://git.openjdk.org/jdk/pull/28053#issuecomment-3515301594


More information about the hotspot-compiler-dev mailing list