RFR: 8364766: C2: Improve Value() of DivI and DivL for non-constant inputs [v10]
Tobias Hotz
duke at openjdk.org
Fri Nov 14 21:39:19 UTC 2025
On Thu, 13 Nov 2025 12:06:02 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/igvn/IntegerDivValueTests.java line 66:
>>
>>> 64: // All constants available during parsing
>>> 65: return getIntConstant(Integer.MIN_VALUE) / getIntConstant(-1);
>>> 66: }
>>
>> Why not add an IR rule that the div is still present after parsing? It seems you have already had the possible issue that javac optimized the div away, right? So this would ensure the optimization really does happen in C2, and that you are checking for the right kinds of nodes.
>
> Consider doing the same in other places in this file ;)
Because it is already optimized during local GVN during parsing, so after parsing, these nodes are already gone
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26143#discussion_r2529015207
More information about the hotspot-compiler-dev
mailing list