RFR: 8352477: RISC-V: Print warnings when unsupported intrinsics are enabled [v2]

Hamlin Li mli at openjdk.org
Fri Mar 21 14:12:11 UTC 2025


On Fri, 21 Mar 2025 13:36:02 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)
>
> Fei Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Review comment
>  - Merge remote-tracking branch 'upstream/master' into JDK-8352477
>  - 8352477: RISC-V: Print warnings when unsupported intrinsics are enabled

Still good, thanks for updating!

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

Marked as reviewed by mli (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24123#pullrequestreview-2706103934


More information about the hotspot-compiler-dev mailing list