-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: hotspot
-
master
Run this test with fastdebug build on platforms without native support for float16:
$ make test TEST="compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java"
```
One or more @IR rules failed:
Failed IR Rules (1) of Methods (1)
----------------------------------
1) Method "public static jdk.incubator.vector.Float16 compiler.floatingpoint.TestSubNodeFloatDoubleNegation.testHalfFloat(jdk.incubator.vector.Float16)" - [Failed IR rules: 1]:
* @IR rule 5: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#SUB#_", "2"}, applyIfPlatform={"riscv64", "true"}, failOn={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={"zfh", "false"}, applyIfAnd={}, applyIfNot={})"
> Phase "PrintIdeal":
- counts: Graph contains wrong number of nodes:
* Constraint 1: "(\d+(\s){2}(Sub(I|L|F|D|HF).*)+(\s){2}===.*)"
- Failed comparison: [found] 3 = 2 [given]
- Matched nodes (3):
* 400 SubF === _ 954 398 [[ 528 479 446 472 472 470 470 ]] !jvms: Float16::subtract @ bci:8 (line 1185) TestSubNodeFloatDoubleNegation::testHalfFloat @ bci:9 (line 67)
* 516 SubI === _ 22 515 [[ 528 ]] !jvms: Float::floatToFloat16 @ bci:71 (line 1172) Float16::valueOf @ bci:5 (line 361) Float16::subtract @ bci:9 (line 1185) TestSubNodeFloatDoubleNegation::testHalfFloat @ bci:9 (line 67)
* 861 SubI === _ 22 860 [[ 873 ]] !jvms: Float::floatToFloat16 @ bci:71 (line 1172) Float16::valueOf @ bci:5 (line 361) Float16::subtract @ bci:9 (line 1185) TestSubNodeFloatDoubleNegation::testHalfFloat @ bci:12 (line 65)
>>> Check stdout for compilation output of the failed methods
```
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 Float class.
$ make test TEST="compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java"
```
One or more @IR rules failed:
Failed IR Rules (1) of Methods (1)
----------------------------------
1) Method "public static jdk.incubator.vector.Float16 compiler.floatingpoint.TestSubNodeFloatDoubleNegation.testHalfFloat(jdk.incubator.vector.Float16)" - [Failed IR rules: 1]:
* @IR rule 5: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#SUB#_", "2"}, applyIfPlatform={"riscv64", "true"}, failOn={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={"zfh", "false"}, applyIfAnd={}, applyIfNot={})"
> Phase "PrintIdeal":
- counts: Graph contains wrong number of nodes:
* Constraint 1: "(\d+(\s){2}(Sub(I|L|F|D|HF).*)+(\s){2}===.*)"
- Failed comparison: [found] 3 = 2 [given]
- Matched nodes (3):
* 400 SubF === _ 954 398 [[ 528 479 446 472 472 470 470 ]] !jvms: Float16::subtract @ bci:8 (line 1185) TestSubNodeFloatDoubleNegation::testHalfFloat @ bci:9 (line 67)
* 516 SubI === _ 22 515 [[ 528 ]] !jvms: Float::floatToFloat16 @ bci:71 (line 1172) Float16::valueOf @ bci:5 (line 361) Float16::subtract @ bci:9 (line 1185) TestSubNodeFloatDoubleNegation::testHalfFloat @ bci:9 (line 67)
* 861 SubI === _ 22 860 [[ 873 ]] !jvms: Float::floatToFloat16 @ bci:71 (line 1172) Float16::valueOf @ bci:5 (line 361) Float16::subtract @ bci:9 (line 1185) TestSubNodeFloatDoubleNegation::testHalfFloat @ bci:12 (line 65)
>>> Check stdout for compilation output of the failed methods
```
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 Float class.
- caused by
-
JDK-8351515 C2 incorrectly removes double negation for double and float
-
- Resolved
-
- links to
-
Commit(master)
openjdk/jdk/a3b1affb
-
Review(master)
openjdk/jdk/28364