RFR: 8332369: C2: assert(false) failed: graph should be schedulable after JDK-8324517
Christian Hagedorn
chagedorn at openjdk.org
Fri May 17 14:20:02 UTC 2024
On Fri, 17 May 2024 07:50:08 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> 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).
That looks reasonable. I've submitted some testing.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19277#pullrequestreview-2063565761
More information about the hotspot-compiler-dev
mailing list