RFR: 8372046: compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java fails IR verification [v2]

Fei Yang fyang at openjdk.org
Wed Nov 19 03:14:52 UTC 2025


> Hi, please consider this test-only change fixing an IR test failure.
> 
> This IR test fails on platforms without native support for `Float16`. The reason is that method `Float::floatToFloat16` is inlined into method `TestSubNodeFloatDoubleNegation.testHalfFloat`, which causes unexpected IR graph. One way to fix this would be disabling inlining of methods from the `java.lang.Float` class.
> 
> After this change, we are doing `CallStaticJava` to convert between `Float16` and `Float` on these platforms:
> 
>   ......
>   259  CallStaticJava  === 5 6 7 8 1 (22 1 669 1 10 1 22 ) [[ 260 261 262 264 ]] # Static  java.lang.Float::float16ToFloat float ( int ) Float16::floatValue @ bci:4 (line 876) Float16::subtract @ b    ci:1 (line 1185) TestSubNodeFloatDoubleNegation::testHalfFloat @ bci:9 (line 69) !jvms: Float16::floatValue @ bci:4 (line 876) Float16::subtract @ bci:1 (line 1185) TestSubNodeFloatDoubleNegation:    :testHalfFloat @ bci:9 (line 69)
> 
>   ......
> 
>   562  CallStaticJava  === 553 507 538 8 1 (526 1 1 1 1 559 559 ) [[ 563 564 565 567 ]] # Static  java.lang.Float::floatToFloat16 short ( float ) Float16::valueOf @ bci:5 (line 361) Float16::subtra    ct @ bci:9 (line 1185) TestSubNodeFloatDoubleNegation::testHalfFloat @ bci:12 (line 67) !jvms: Float16::valueOf @ bci:5 (line 361) Float16::subtract @ bci:9 (line 1185) TestSubNodeFloatDoubleNegat    ion::testHalfFloat @ bci:12 (line 67)
> 
>   ......
> 
> 
> Verified with fastdebug build on aarch64, x86_64 and riscv64 platforms.

Fei Yang has updated the pull request incrementally with one additional commit since the last revision:

  Review

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28364/files
  - new: https://git.openjdk.org/jdk/pull/28364/files/f9cefa48..3ef234bd

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

  Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/28364.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28364/head:pull/28364

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


More information about the hotspot-compiler-dev mailing list