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

Ramkumar Sunderbabu rsunderbabu at openjdk.org
Mon Nov 17 12:10:06 UTC 2025


On Wed, 5 Nov 2025 09:44:57 GMT, Andrew Haley <aph 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.
>> 
>> ```shell
>> $ 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?
> 
> That is correct.
> 
> 
>   // Determine if the compiler corresponding to the compilation level 'compLevel'
>   // and to the compilation context 'compilation_context' provides an intrinsic
>   // for the method 'method'. An intrinsi...

@theRealAph could you please help with the review?

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

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


More information about the hotspot-compiler-dev mailing list