RFR: 8375653: C2: CmpUNode::sub is not monotonic

Hannes Greule hgreule at openjdk.org
Thu Jan 22 07:03:55 UTC 2026


On Thu, 22 Jan 2026 04:40:17 GMT, Dean Long <dlong at openjdk.org> wrote:

> Even if it turns out that the is_index_range_check() code is still needed, we could make CmpULNode::sub static and refactor CmpUNode::sub to have a static helper that can be tested stand-alone.

With memory segments, I'd argue we should rather look into also improving CmpULNode in the same way (there are also more opportunities that could be handled there, see https://bugs.openjdk.org/browse/JDK-8286679). But the purely type-based code could be extracted and probably even shared between CmpU and CmpUL.

Given this is a P2 bug, it might make sense to rather integrate this simple fix and do additional refactorings later.

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

PR Comment: https://git.openjdk.org/jdk/pull/29308#issuecomment-3782857416


More information about the hotspot-compiler-dev mailing list