RFR: 8356813: Improve Mod(I|L)Node::Value

Hannes Greule hgreule at openjdk.org
Sun May 25 11:51:51 UTC 2025


On Sun, 25 May 2025 11:27:36 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> `TypeNode` kills all paths below it if it becomes `TOP`, I think it is the expected behaviour when the divisor is a constant zero in that path.

I think I just misread the usage of `_maybe_top_type_nodes` in PhaseCCP. It checks whether the type is still TOP after the analysis, so starting with TOP is fine. In that case, I don't see any problem with TOP anymore. Thanks!

> You are just lucky using zero in this particular operation and it seems to be monotonic, but if you apply the same logic to similar operations, like `Div`, `UMod`, you will see that zero can make them non-monotonic. As a result, I can confidently say that using zero here is incorrect.

Yes, I was referring to only the current state of the changed functions.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25254#discussion_r2106176218


More information about the hotspot-compiler-dev mailing list