RFR: 8309109: AArch64: [TESTBUG] compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java fails on Neoverse N2 and V1

Hao Sun haosun at openjdk.org
Tue Jun 20 06:41:04 UTC 2023


`UseSHA3Intrinsics` was introduced in JDK-8252204, but it was not auto-enabled due to the lack of real hardware. In JDK-8297092, the intrinsic was evaluated on existing hardware with the support of SHA3 feature (including Neoverse N2/V1 and Apple silicon), and it was auto-enabled by default on Apple silicon only. See the code [1].

As a result, test case `TestUseSHA3IntrinsicsOptionOnSupportedCPU.java` fails on Neoverse N2 and V1 with the following error message:


JavaTest Message: Test threw exception: java.lang.AssertionError: Option 'UseSHA3Intrinsics' is expected to have 'true' value
Option 'UseSHA3Intrinsics' should be enabled by default


The group of test cases `TestUseXXXIntrinsicsOptionOnSupportedCPU.java` are designed to verify that, option `UseXXXIntrinsics` should be enabled by default if the underlying hardware supports the corresponding CPU feature.

Apparently this check condition doesn't work for `UseSHA3Intrinsics`. The other expcetion case is `UseSHA512Intrinsics`. See JDK-8257796.

Fix: One `@requires` condition is added in this patch to limit that this test case is only run on macOS on Apple silicon. Note that SHA3 feature is currently supported by AArch64 only.

Test: this test case passed on Linux/Neoverse N2, Linux/Neoverse V1 and macOS on Apple silicon.

[1] https://github.com/openjdk/jdk/pull/11382/files#diff-a87e260510f34ca7d9b0feb089ad982be8268c5c8aa5a71221f6738b051ea488R338-R345

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

Commit messages:
 - 8309109: AArch64: [TESTBUG] compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java fails on Neoverse N2 and V1

Changes: https://git.openjdk.org/jdk/pull/14551/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14551&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8309109
  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/14551.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14551/head:pull/14551

PR: https://git.openjdk.org/jdk/pull/14551


More information about the hotspot-compiler-dev mailing list