RFR: 8268261: C2: assert(n != __null) failed: Bad immediate dominator info.

Vladimir Kozlov kvn at openjdk.java.net
Thu Jul 22 19:50:34 UTC 2021


The control for AddP node is set on N483 loop exit projection. AddP is address for Load node from following loop N426. 
After unswithching N483 loop its exit become nested and does not dominate loop N426. Which cause failure during following loop N426 unroll which tries to update control for Load node by looking on controls of its inputs.

I thought about not to place node on loop's exit projection as we do for loop's entry:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/loopnode.cpp#L5354
But it is not always possible.

I suggest to exit current round of loopopts when loop is unswitched and do an other round to recalculate idom data. 
It should not affect compilation speed noticeable because unswitching is rare case.

Tested tier1-3, xcomp. Currently running performance testing.

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

Commit messages:
 - 8268261: C2: assert(n != __null) failed: Bad immediate dominator info.

Changes: https://git.openjdk.java.net/jdk/pull/4879/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4879&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8268261
  Stats: 75 lines in 2 files changed: 74 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4879.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4879/head:pull/4879

PR: https://git.openjdk.java.net/jdk/pull/4879


More information about the hotspot-compiler-dev mailing list