JDK-8273416 : C2: assert(false) failed: bad AD file after JDK-8252372 with UseSSE={0,1}
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-07
  • Updated: 2021-11-16
  • Resolved: 2021-11-01
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 17 JDK 18
17.0.2Fixed 18 b22Fixed
Related Reports
Relates :  
Relates :  
Description
This reliably reproduces with the existing test:

$ CONF=linux-x86-server-fastdebug make run-test TEST=java/util/Random/RandomTestMoments.java TEST_VM_OPTS="-XX:UseAVX=0 -XX:UseSSE=0"

#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/opto/matcher.cpp:1681), pid=1313665, tid=1313681
#  assert(false) failed: bad AD file


o1789  AddD  === _ o1790 o436  [[o1785 ]] 

--N: o1789  AddD  === _ o1790 o436  [[o1785 ]] 

   --N: o1790  CastDD  === o1112 o1086  [[o1789 ]]  #double unconditional dependency
   REGD  100  castDD
   LEGREGD  200  MoveD2LEG
   VLREGD  200  MoveD2VL

      --N: o1086  RoundDouble  === _ o1085  [[o1189 o1792 o1790 ]] 
      REGDPR  0  REGDPR
      REGDPR1  0  REGDPR1
      REGDPR2  0  REGDPR2
      REGNOTDPR1  0  REGNOTDPR1
      REGD  100  MoveVL2D
      LEGREGD  200  MoveD2LEG
      VLREGD  0  VLREGD

   --N: o436  Phi  === o1762 o380 o1459  [[o1451 o730 o1458 o1789 o1791 ]]  #double
   REGDPR  0  REGDPR
   REGDPR1  0  REGDPR1
   REGDPR2  0  REGDPR2
   REGNOTDPR1  0  REGNOTDPR1
   REGD  100  MoveVL2D
   LEGREGD  200  MoveD2LEG
   VLREGD  0  VLREGD

I think the newly added CastDD nodes should handle regDPR instead of just regD to avoid this mismatch error.
Comments
Fix Request (17u) This fixes a recent regression in 17u. Patch applies cleanly, fixes some x86_32 failures, and does not regress x86_64.
10-11-2021

Changeset: 89ade1d7 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2021-11-01 12:30:43 +0000 URL: https://git.openjdk.java.net/jdk/commit/89ade1d7e88ee005c3fd2136d84e298d94f9a67c
01-11-2021

ILW = Crash in C2's matcher (regression in JDK 17), reproducible with test and -XX:UseAVX=0 -XX:UseSSE=0, disable compilation of affected method = HMM = P2
07-09-2021