Integrated: 8353730: TestSubNodeFloatDoubleNegation.java fails with native Float16 support

Manuel Hässig duke at openjdk.org
Fri Apr 11 11:32:35 UTC 2025


On Thu, 10 Apr 2025 08:31:05 GMT, Manuel Hässig <duke at openjdk.org> wrote:

> Due to insufficient testing on machines supporting FP16 arithmetic in their ISA, I missed that these machines generate two `SUB_FH` nodes and, crucially, an additional `SUB_F` node. We suspect that this comes from some kind of fallback code path ([open issue](https://bugs.openjdk.org/browse/JDK-8353732); also see [discussion in RISC-V PR fixing the same issue](https://github.com/openjdk/jdk/pull/24421#issuecomment-2777755042)).
> 
> This PR fixes this issue for all architectures that support FP16 instructions (that I know of), by only matching `SUB_HF` nodes when the CPU supports FP16. The tests for ARM are currently commented out, due to the support for Float16 still being a work in progress (see PR #23748).
> 
> I tested the fix using software emulation of an x86_64 CPU with the `avx512_fp16` feature. I also ran the [sanity checks](https://github.com/mhaessig/jdk/actions/runs/14376762241) (the Alpine Linux build fails at `configure`, which is unrelated to this change) as well as tier1 through tier3 and Oracle internal testing.

This pull request has now been integrated.

Changeset: efb5a80e
Author:    Manuel Hässig <manuel at haessig.org>
Committer: Christian Hagedorn <chagedorn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/efb5a80e52c8314103e1ccec05af6ab480531df0
Stats:     8 lines in 1 file changed: 3 ins; 0 del; 5 mod

8353730: TestSubNodeFloatDoubleNegation.java fails with native Float16 support

Reviewed-by: chagedorn, thartmann

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

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


More information about the hotspot-compiler-dev mailing list