JDK-8371523 : C2 fails with Missed optimization opportunity in PhaseIterGVN for ConvI2F / ConvF2L
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2025-11-10
  • Updated: 2025-11-10
  • Resolved: 2025-11-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26Resolved
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8371528 :  
Description
java -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xbatch -XX:VerifyIterativeGVN=1110 Test_1751.java

< Missed Identity optimization:
< Old node:
< dist dump
< ---------------------------------------------
<    1  375  ConvF2I  === _ 352  [[ 419 380 385 517 ]]  #int !orig=411 !jvms: Test_1751::mainTest @ bci:262 (line 190)
<    0  380  ConvI2F  === _ 375  [[ 381 ]]  #float !jvms: Test_1751::mainTest @ bci:279 (line 191)
< New node:
< dist dump
< ---------------------------------------------
<    1  518  Phi  === 543 53 383  [[ 352 594 315 383 ]]  #int:1..193, widen: 3 #tripcount !orig=[293] !jvms: Test_1751::mainTest @ bci:192 (line 180)
<    0  352  ConvI2F  === _ 518  [[ 377 594 375 382 377 ]]  #float !orig=[295] !jvms: Test_1751::mainTest @ bci:229 (line 184)
< 

java -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:StressSeed=689678116 -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMacroExpansion -XX:+StressLoopPeeling -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0 -XX:VerifyIterativeGVN=1110 Test_547.java

< Missed Identity optimization:
< Old node:
< dist dump
< ---------------------------------------------
<    1  1150  ConvL2F  === _ 1172  [[ 1141 ]]  #float !orig=[1140],[887],[710] !jvms: Test_547::mainTest @ bci:337 (line 151)
<    0  1141  ConvF2L  === _ 1150  [[ 1174 718 723 711 ]]  #long !orig=[887],[710] !jvms: Test_547::mainTest @ bci:337 (line 151)
< New node:
< dist dump
< ---------------------------------------------
<    1  1173  ConvL2F  === _ 1174  [[ 1172 ]]  #float !orig=1150,[1140],[887],[710] !jvms: Test_547::mainTest @ bci:337 (line 151)
<    0  1172  ConvF2L  === _ 1173  [[ 1171 1150 1151 ]]  #long !orig=1141,[887],[710] !jvms: Test_547::mainTest @ bci:337 (line 151)
Comments
Closed it as duplicate of JDK-8369646. If the issue comes back, feel free to reopen it.
10-11-2025

Pasting all cases that I could see fail so far: < Missed Identity optimization: < Old node: < dist dump < --------------------------------------------- < 1 1150 ConvL2F === _ 1172 [[ 1141 ]] #float !orig=[1140],[887],[710] !jvms: Test_547::mainTest @ bci:337 (line 151) < 0 1141 ConvF2L === _ 1150 [[ 1174 718 723 711 ]] #long !orig=[887],[710] !jvms: Test_547::mainTest @ bci:337 (line 151) < New node: < dist dump < --------------------------------------------- < 1 1173 ConvL2F === _ 1174 [[ 1172 ]] #float !orig=1150,[1140],[887],[710] !jvms: Test_547::mainTest @ bci:337 (line 151) < 0 1172 ConvF2L === _ 1173 [[ 1171 1150 1151 ]] #long !orig=1141,[887],[710] !jvms: Test_547::mainTest @ bci:337 (line 151) < < Missed Identity optimization: < Old node: < dist dump < --------------------------------------------- < 1 2315 ConvL2D === _ 2120 [[ 2306 2314 2318 ]] #double !orig=845,[2608],[2215] !jvms: Test_2167::vMeth @ bci:128 (line 56) < 0 2314 ConvD2L === _ 2315 [[ 2313 1052 845 ]] #long !orig=1074 !jvms: Test_2167::vMeth @ bci:204 (line 65) < New node: < dist dump < --------------------------------------------- < 1 2121 ConvL2D === _ 2123 [[ 2112 2120 2124 ]] #double !orig=845,[2608],[2215] !jvms: Test_2167::vMeth @ bci:128 (line 56) < 0 2120 ConvD2L === _ 2121 [[ 2119 2315 2316 2667 ]] #long !orig=1074 !jvms: Test_2167::vMeth @ bci:204 (line 65) < < < Missed Identity optimization: < Old node: < dist dump < --------------------------------------------- < 1 1186 ConvF2I === _ 971 [[ 1185 ]] #int !orig=541,[542],[1063] !jvms: Test_1341::iMeth1 @ bci:100 (line 90) < 0 1185 ConvI2F === _ 1186 [[ 1184 ]] #float !orig=596 !jvms: Test_1341::iMeth1 @ bci:133 (line 94) < New node: < dist dump < --------------------------------------------- < 1 972 MulI === _ 973 27 [[ 971 ]] !orig=[542],[1063] !jvms: Test_1341::iMeth1 @ bci:101 (line 90) < 0 971 ConvI2F === _ 972 [[ 1186 ]] #float !orig=596 !jvms: Test_1341::iMeth1 @ bci:133 (line 94) <
10-11-2025

ILW = Same as JDK-8359603 = P4
10-11-2025

Potentially related to JDK-8369646.
10-11-2025