JDK-8187822 : C2 conditonal move optimization might create broken graph
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,9,10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-09-22
  • Updated: 2019-07-31
  • Resolved: 2017-10-05
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 10 JDK 8
10 b31Fixed 8u172Fixed
Related Reports
Relates :  
Attached test case fails with:

#  Internal Error (/home/rwestrel/aarch64-jdk8u-shenandoah/hotspot/src/share/vm/opto/loopnode.cpp:3579), pid=6922, tid=0x00007f4472cc4700
#  assert(false) failed: Bad graph detected in build_loop_late

PhaseIdealLoop::conditional_move() creates a CMoveI node, updates the control of its inputs but not of a dependent data node. A following split thru phi leads to a broken graph.
Changeset: b3fd664e5af2 Author: roland Date: 2017-09-27 16:17 +0200 URL: http://hg.openjdk.java.net/jdk10/hs/rev/b3fd664e5af2

Changes are pushed but for some reasons bug is not updated: http://hg.openjdk.java.net/jdk10/hs/rev/b3fd664e5af2

Tested changes: http://cr.openjdk.java.net/~roland/8187822/changeset

initial ILW = HMM = P2 I = crash, assert failure - bad graph detected; L = with c2, conditional_move optimizations, rare cases!; W = disable optimization - UseCMoveUnconditionally!