RFR: 8332369: C2: assert(false) failed: graph should be schedulable after JDK-8324517

Roland Westrelin roland at openjdk.org
Fri May 17 07:54:09 UTC 2024


The issue occurs when a `Mod` node is processed during
final_graph_reshaping: if a `Div` node is found with the same inputs,
the `Mod` is replaced either by a `DivMod` node or a subgraph that has
the `Div` node as input. Finding the `Div` node is done
`find_similar()` which ignores the precedence edges. What happens is
that the `Div` node returned by `find_similar()` could have a
precedence edge that pins it at a control that doesn't dominate the
control of some of the uses of the `Mod` node.

The fix I propose is to simply not perfom the transformation if one of
the nodes has precedence edges (which should be a rare corner case).

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

Commit messages:
 - fix

Changes: https://git.openjdk.org/jdk/pull/19277/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19277&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8332369
  Stats: 29 lines in 4 files changed: 1 ins; 20 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/19277.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19277/head:pull/19277

PR: https://git.openjdk.org/jdk/pull/19277


More information about the hotspot-compiler-dev mailing list