RFR: 8356813: Improve Mod(I|L)Node::Value [v9]
Hannes Greule
hgreule at openjdk.org
Fri Sep 19 14:17:26 UTC 2025
On Fri, 19 Sep 2025 13:49:08 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Hannes Greule has updated the pull request incrementally with one additional commit since the last revision:
>>
>> remove unused parameter
>
> src/hotspot/share/opto/divnode.cpp line 1211:
>
>> 1209: // We always generate the dynamic check for 0.
>> 1210: // 0 MOD X is 0
>> 1211: if (t1 == TypeInteger::zero(bt)) { return t1; }
>
> I think the culprit for [JDK-8356813](https://bugs.openjdk.org/browse/JDK-8356813) is this place. We need to check for the divisor being a constant 0 and return `Type::TOP` before this check and the check below.
Yes, I already worked a bit on it, see https://github.com/SirYwell/jdk/tree/fix/mod-not-monotonic but I didn't have time to create a PR yet.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25254#discussion_r2363030436
More information about the hotspot-compiler-dev
mailing list