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

Hamlin Li mli at openjdk.org
Wed Aug 20 09:27:32 UTC 2025


> 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!

Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:

  minors

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26838/files
  - new: https://git.openjdk.org/jdk/pull/26838/files/3f834dfd..42858774

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26838&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26838&range=00-01

  Stats: 12 lines in 4 files changed: 3 ins; 1 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/26838.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26838/head:pull/26838

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


More information about the hotspot-dev mailing list