RFR: 8256016: Dacapo24H.java failed with "assert(false) failed: unscheduable graph"

Christian Hagedorn chagedorn at openjdk.java.net
Tue Nov 24 13:11:07 UTC 2020


In the replay compilation, a `CastPP` node belonging to a null-check `If` node floats above its null-check and is then split through a phi. This results in a broken control input for the `CastPP` node which eventually makes the graph unschedulable.

The problem can be traced back to the optimization done in `IfNode::simple_subsuming()`:

![missing_data_dependencies](https://user-images.githubusercontent.com/17833009/100085013-cce64500-2e4b-11eb-8773-1364577da8f2.png)

The dominating test `8792 If` subsumes the original null-check `6691 If` and its condition is replaced by the constant `230 ConI`. However, we forget to rewire data dependencies, in this case `6694 CastPP`, to the `8794 IfTrue` projection of the dominating test. This is a problem because `6691 If` is not yet removed by igvn but we already apply the Ideal optimization for the newly created `8792 If` node. We find that `8800 If` is an identical test that dominates `8792 If`. All control dependent data nodes are updated to the dominating `8802 IfTrue` projection and the dominated test `8792 If` is removed. But in this step, we do not find the `6694 CastPP` at `8794 IfTrue` because we have not updated its control input and `6691 If` was not yet removed such that it could have ended up at `8794 IfTrue`.

The fix is to rewire any data dependencies of the always taken projection of the subsumed test in `IfNode::simple_subsuming()` to the corresponding projection of the dominating test.

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

Commit messages:
 - 8256016: Dacapo24H.java failed with "assert(false) failed: unscheduable graph"

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

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


More information about the hotspot-compiler-dev mailing list