RFR: 8367967: C2: "fatal error: Not monotonic" with Mod nodes

Matthias Baesken mbaesken at openjdk.org
Mon Sep 22 06:52:17 UTC 2025


On Sun, 21 Sep 2025 06:11:11 GMT, Hannes Greule <hgreule at openjdk.org> wrote:

> Generally, we shouldn't return a wider type (ZERO) if there is a later case that would return a more narrow type (TOP) for the same input types. If the inputs are widened and the first case doesn't match anymore but the later one still does, the result is not monotonic with the previous result.
> 
> Please review :)

I'll  test this in our CI to see if this fixes the linux aarch64 issues (observed when running Test java/foreign/TestUpcallStress.java ) .

Btw. why do we get always zero size replay files when running into the issue ?


# Internal Error (/priv/jenkins/client-home/workspace/openjdk-jdk-dev-linux_aarch64-dbg/jdk/src/hotspot/share/opto/phaseX.cpp:2763), pid=1089937, tid=1089972
# fatal error: Not monotonic


Is it another bug of the replay file generation or a known limitation ?

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

PR Comment: https://git.openjdk.org/jdk/pull/27408#issuecomment-3317214622
PR Comment: https://git.openjdk.org/jdk/pull/27408#issuecomment-3317218427


More information about the hotspot-compiler-dev mailing list