RFR: 8372941: Rework compiler/intrinsics/sha tests to use intrinsic availability
Hao Sun
haosun at openjdk.org
Thu Dec 4 05:34:54 UTC 2025
On Wed, 3 Dec 2025 13:11:27 GMT, Ramkumar Sunderbabu <rsunderbabu at openjdk.org> wrote:
> Predicate probes of the following algos are changed to rely on intrinsics availability in the platform as opposed to hardware support availability.
> MD5
> SHA1
> SHA256
> SHA3
>
> Testing:
> All flag combinations from CI
> hotspot tiers 1 to 5
> PS: only for tier testings, mac-aarch was skipped due to resource constraints
Thanks for your work.
I suppose the **os.arch** requires condition can be removed in the following cases:
diff --git a/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseMD5IntrinsicsOptionOnSupportedCPU.java b/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseMD5IntrinsicsOptionOnSupportedCPU.java
index eeff351f737..3561be3b33b 100644
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseMD5IntrinsicsOptionOnSupportedCPU.java
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseMD5IntrinsicsOptionOnSupportedCPU.java
@@ -25,10 +25,8 @@
* @test
* @bug 8035968
* @summary Verify UseMD5Intrinsics option processing on supported CPU.
- * ( Disable this test on riscv, because on riscv UseMD5Intrinsics depends on !AvoidUnalignedAccesses. )
* @library /test/lib /
* @requires vm.flagless
- * @requires os.arch != "riscv64"
*
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
diff --git a/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java b/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java
index 1ce2c4b1f87..71ed3b3cac9 100644
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java
@@ -25,10 +25,8 @@
* @test
* @bug 8035968
* @summary Verify UseSHA1Intrinsics option processing on supported CPU.
- * ( Disable this test on riscv, because on riscv UseSHA1Intrinsics depends on !AvoidUnalignedAccesses. )
* @library /test/lib /
* @requires vm.flagless
- * @requires os.arch != "riscv64"
*
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
diff --git a/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java b/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java
index d3c0a4a8da7..41a2ec277a2 100644
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java
@@ -28,10 +28,8 @@
* @summary Verify UseSHA3Intrinsics option processing on supported CPU.
* @library /test/lib /
* @requires vm.flagless
- * @requires os.arch == "aarch64" & os.family == "mac"
+ * @requires os.arch == "aarch64"
* @comment sha3 is only implemented on AArch64 for now.
- * UseSHA3Intrinsics is only auto-enabled on Apple silicon, because it
- * may introduce performance regression on others. See JDK-8297092.
*
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
I checked on Nvidia Grace machine with the above patch. `TestUseSHA3IntrinsicsOptionOnSupportedCPU.java` can pass.
If this patch is fine to you, we'd better run the tests on ricsv64 for safety.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28634#issuecomment-3610316715
More information about the hotspot-compiler-dev
mailing list