On Tue, 2 Dec 2025 02:30:28 GMT, Vladimir Ivanov <[email protected]> wrote:
>> JIT can fully optimize it in JMH benchmarks. I don't know why the IR in this >> test can't optimize it - I couldn't reproduce this CI failure locally on my >> linux-x64-debug profile, but this modified test passes on CI. > > I'd say it's a bad sign. Intermittent bugs manifest exactly in such a way. > The performance is measured by the existing > `org.openjdk.bench.java.lang.invoke.VarHandleExact` benchmark, which > originally expects `generic_genericInvocation` to be much slower. Now it > instead has a performance on par with the exact invocations. > > The constant folding ability is verified with the new > `VarHandleMismatchedTypeFold` IR test. The benchmark doesn't consider such inexact getAndAdd calls (with a void return type), I think it should cover that too. This is a very common pattern that really must not regress. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2580041626
