Integrated: 8352477: RISC-V: Print warnings when unsupported intrinsics are enabled

Fei Yang fyang at openjdk.org
Sat Mar 22 02:35:16 UTC 2025


On Thu, 20 Mar 2025 02:32:18 GMT, Fei Yang <fyang at openjdk.org> wrote:

> Hi, please consider this small change.
> 
> `UsePoly1305Intrinsics`, `UseMD5Intrinsics` and `UseSHA1Intrinsics` depend on `!AvoidUnalignedAccesses` and thus are unavailable on platforms with slow unaligned accesses. But these options could still be enabled on the command line, which I think could be suprising to our end users as these intrinsics will only have negative impact on performance numbers for such platforms. It seems to me more reasonable to print warnings and keep them disabled when enabled by the user on such platforms. After this change, we have:
> 
> 
> ubuntu at premier-p550:~/jdk$ java -XX:+UnlockDiagnosticVMOptions -XX:+UseMD5Intrinsics -version
> OpenJDK 64-Bit Server VM warning: Intrinsics for MD5 crypto hash functions not available on this CPU.
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (build 25-internal-adhoc.ubuntu.jdk)
> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
> 
> ubuntu at premier-p550:~/jdk$ java -XX:+UnlockDiagnosticVMOptions -XX:+UsePoly1305Intrinsics -version
> OpenJDK 64-Bit Server VM warning: Intrinsics for Poly1305 crypto hash functions not available on this CPU.
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (build 25-internal-adhoc.ubuntu.jdk)
> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
> 
> ubuntu at premier-p550:~/jdk$ java -XX:+UnlockDiagnosticVMOptions -XX:+UseSHA1Intrinsics -version
> OpenJDK 64-Bit Server VM warning: Intrinsics for SHA-1 crypto hash functions not available on this CPU.
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (build 25-internal-adhoc.ubuntu.jdk)
> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)

This pull request has now been integrated.

Changeset: 5dd0acb3
Author:    Fei Yang <fyang at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5dd0acb3cddb96845062c0b7cee1e384e69f43cb
Stats:     23 lines in 1 file changed: 13 ins; 4 del; 6 mod

8352477: RISC-V: Print warnings when unsupported intrinsics are enabled

Reviewed-by: mli, rehn, fjiang

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

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


More information about the hotspot-compiler-dev mailing list