RFR: 8349139: C2: Div looses dependency on condition that guarantees divisor not null in counted loop

Quan Anh Mai qamai at openjdk.org
Thu Feb 13 17:22:13 UTC 2025


On Thu, 13 Feb 2025 17:03:06 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> For any `Phi`? This seems like an issue that's specific to the counted loop iv. I don't think we want to add `CastII` nodes unless we're sure they are needed.

I think it is probably because we are more aggressive with the type of loop phis. Conceptually, a `Phi` is pinned, and idealizing it into a floating node is incorrect. So, there may be issues lurking around due to this. We can introduce another phase that tries to remove all `CastNode` and pins all nodes that need that dependency (such as `Div`, loads, etc). What do you think?

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

PR Comment: https://git.openjdk.org/jdk/pull/23617#issuecomment-2657267497


More information about the hotspot-compiler-dev mailing list