RFR: 8325674: Constant fold across compares

Joshua Cao duke at openjdk.org
Wed Feb 28 17:15:45 UTC 2024


On Tue, 27 Feb 2024 10:02:53 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> I am asking for it because your change brings some risks. Messing with RangeChecks is risky business. Dropping guards wrongly opens us up to out of bounds access.

Agreed, but if the compiler is smart enough we can make correct optimizations. In this case, I'm using existing APIs which have been working in the real world. I think we can trust it.

> Similar questions will apply for your proposal in https://bugs.openjdk.org/browse/JDK-8325995

@eme64 I left a comment there. Could you take a look? I understand why the benefits of this PR are questionable, but the benefits for that issue should be more apparent. I'd like to know if its a worthwhile direction to work on.

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

PR Comment: https://git.openjdk.org/jdk/pull/17853#issuecomment-1969462078


More information about the hotspot-compiler-dev mailing list