RFR: 8372266: Relax store matchers in compiler/escapeAnalysis/TestRematerializeObjects.java test

Aleksey Shipilev shade at openjdk.org
Mon Nov 24 16:46:01 UTC 2025


On Mon, 24 Nov 2025 06:59:58 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> But how do you now know that the `StoreL` is really coming from the merged `StoreI`, and that it is not some other unrelated `StoreL`?

Well, because there are no `long` stores in Java code at all, so whatever that `StoreL` came from, it is JIT-generated? So then the IR test verifies that whatever happens with EA and MergeStores makes sure the store either goes away, or some merged store remains. I personally dislike overly-specific tests that rely on particulars of optimization sequencing or some such, and would rather have a test that checks the generic final state, without over-specificity.

> The motivation seems to be that printing of store nodes was a bit different in JDK25. But then we just have to adjust the matching a bit, maybe weaken the IR rule for backports. But I'd prefer not to weaken the IR rule on mainline.

Yes. I mean, there is a tradeoff somewhere here: either mainline relaxes the test and then JDK 25 matches the test version, or JDK 25 diverges. We _usually_ try to avoid divergence, if we can, because they continuously bite us. If your preference about not relaxing the mainline version is strong, then I can yield and diverge JDK 25. It would likely be literally the same fix I have here.

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

PR Comment: https://git.openjdk.org/jdk/pull/28437#issuecomment-3571739533


More information about the hotspot-compiler-dev mailing list