RFR: 8330266: RISC-V: Restore frm to RoundingMode::rne after JNI [v2]

Ludovic Henry luhenry at openjdk.org
Tue Apr 16 09:52:59 UTC 2024


On Tue, 16 Apr 2024 07:19:36 GMT, Vladimir Kempik <vkempik at openjdk.org> wrote:

>> It's done by following reasons:
>> 1. by the optimization guide, https://riscv-optimization-guide.riseproject.dev/#_controlling_rounding_behavior_scalar.
>> 2. aarch64 apply the similar optimization.
>> 
>> Please also check discussion at: https://github.com/openjdk/jdk/pull/18758
>
> Thanks for the links, however there are no performance claims in that discussion, only few "maybes" for "some hardware", can we check on existing h/w ( c910, u74) ? with jmh test doing dummy jni calls ?

@VladimirKempik https://riscv-optimization-guide.riseproject.dev/#_controlling_rounding_behavior_scalar is written by multiple industry player who know how their hardware is going to behave, and it is confirmed that it will be more performant to have this `frrm`+`beq` than always doing `fsrm`. If you disagree with the wording in that guide, you're welcome to open a discussion on https://gitlab.com/riseproject/riscv-optimization-guide.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18785#discussion_r1567073210


More information about the hotspot-dev mailing list