RFR: 8324517: C2: crash in compiled code because of dependency on removed range check CastIIs [v2]

Roland Westrelin roland at openjdk.org
Wed May 15 07:19:04 UTC 2024


On Tue, 14 May 2024 20:40:18 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> I realized that I didn't understand your comment when I replied.
>> What you're saying, I think, is that if we have, say, a `CastII` that's input to a `DivI` node, if the input to that cast is non zero, then we don't need to add the `CastII` control as dependency to the `DivI`. The problem, I think, is that the `CastII` could be input to say an `AddI` node which would then be input to the `DivI`. What we would then need to know is whether if we remove the `CastII`, the `AddI` is still non null or not. That doesn't seem straightforward because this is done once we have no igvn instance to propagate types anymore. So, while I agree this is conservative, it still seems like the most reasonable fix.
>
>> What you're saying, I think, is that if we have, say, a CastII that's input to a DivI node, if the input to that cast is non zero, then we don't need to add the CastII control as dependency to the DivI
> 
> Yes, that was my point.
> 
>> That doesn't seem straightforward because this is done once we have no igvn instance to propagate types anymore. So, while I agree this is conservative, it still seems like the most reasonable fix.
> 
> Right, we can still go down that path if it ever becomes necessary.
> 
>> That seems like a different problem that out of the scope of this particular issue.
> 
> Could you please file a follow-up bug for that?

I filed https://bugs.openjdk.org/browse/JDK-8332268

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18377#discussion_r1601082387


More information about the hotspot-compiler-dev mailing list