RFR: 8332827: [REDO] C2: crash in compiled code because of dependency on removed range check CastIIs [v3]
Roland Westrelin
roland at openjdk.org
Thu Dec 12 09:01:38 UTC 2024
On Thu, 12 Dec 2024 07:17:06 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> If the divisor input for a `Div` (or `Mod` etc.) is not not null, then the control input of the `Div` is set to null. It could be that the divisor input is found not null because the subgraph for that input contains a `CastII`. If that happens, removing the `CastII` during final graph reshap could cause the `Div` to float above the `CastII` and above the condition that allowed the type of the `CastII` to be narrowed. This could cause a crash.
>> So when the `CastII` is removed, precedence edges are aded to the `Div` node. If the `Div` is then replaced by a `DivMod`, we need to transfer the precedence edges to the `DivMod` node.
>
> Why not add such a comment to the code then?
Added
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22568#discussion_r1881645924
More information about the hotspot-compiler-dev
mailing list