Integrated: 8365206: RISC-V: compiler/c2/irTests/TestFloat16ScalarOperations.java is failing on riscv64

Hamlin Li mli at openjdk.org
Tue Aug 26 09:57:45 UTC 2025


On Tue, 19 Aug 2025 08:22:59 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Hi,
> Can you help to review this patch?
> 
> Currently implementation of conversion from float to float16 only preserve some significant bits of a NaN, which is not right in some cases.
> As this (NaN conversion from float to float16) is already in the slow path, so I'll just fix it by preserving all significant bits in the same way as j.l.Float.floatToFloat16.
> As current tests does not catch the issue, except of TestFloat16ScalarOperations.java, so add another test.
> 
> There is also the similar issue in vector version of conversion from float to float16, I'll address it in another pr [JDK-8365772](https://bugs.openjdk.org/browse/JDK-8365772)
> 
> Thanks!

This pull request has now been integrated.

Changeset: 28602f3d
Author:    Hamlin Li <mli at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/28602f3d3ec15b5241a33a46ce43349e6300395d
Stats:     264 lines in 6 files changed: 237 ins; 21 del; 6 mod

8365206: RISC-V: compiler/c2/irTests/TestFloat16ScalarOperations.java is failing on riscv64

Reviewed-by: fyang, rehn, dzhang

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

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


More information about the hotspot-dev mailing list