RFR: 8309109: AArch64: [TESTBUG] compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java fails on Neoverse N2 and V1
Andrew Haley
aph at openjdk.org
Tue Jun 20 08:38:21 UTC 2023
On Tue, 20 Jun 2023 06:35:15 GMT, Hao Sun <haosun at openjdk.org> wrote:
> `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
test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java line 31:
> 29: * @library /test/lib /
> 30: * @requires vm.flagless
> 31: * @requires os.arch == "aarch64" & os.family == "mac"
I think this requires a comment. Something to the effect that we don't always enable the use of SHA3 instructions because they don't always help.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14551#discussion_r1234931737
More information about the hotspot-compiler-dev
mailing list