On Thu, 12 Mar 2026 13:16:30 GMT, Benoît Maillard <[email protected]> wrote:

> This PR fixes an IR mismatch in `TestLWorld.java` for `test85` and `test86`. 
> When merging jdk-26+17, there were some changes to 
> `G1BarrierSetC2::estimated_barrier_size` due to 
> [JDK-8342382](https://bugs.openjdk.org/browse/JDK-8342382). The barrier size 
> is significantly reduced, opening the door to more unrolling as per 
> `IdealLoopTree::policy_unroll`. In the specific case of `test85` and 
> `test86`, this leads to unrolling where there previously was none and 
> splitting a `CountedLoop` into a main and post loop. This breaks the IR rules 
> because they rely on exact nodes count.
> 
> For `test86`, we can trivially replace `COUNTED_LOOP` by `COUNTED_LOOP_MAIN` 
> to avoid counting the loop twice.
> 
> For `test85`, we also have a check on `LOAD_UNKNOWN_INLINE`, which ends up 
> being appearing four times in the default setup (because of unrolling and 
> pre/main/post). This is a bit annoying. It seems the best solution in this 
> case is to check the IR right before the pre/main/post, that is at 
> `PHASEIDEALLOOP2`.
> 
> ### Testing
> - [x] GitHub Actions
> - [x] tier1-4 for this specific test, plus some internal testing
> 
> Thank you for reviewing!

This pull request has now been integrated.

Changeset: 329029d2
Author:    Benoît Maillard <[email protected]>
Committer: Tobias Hartmann <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/329029d25f15d069c2de4ce3c3860a91a354e458
Stats:     6 lines in 1 file changed: 2 ins; 0 del; 4 mod

8370070: [lworld] Merge of 8342382 causes IR mismatches in TestLWorld test85 & 
test86

Reviewed-by: chagedorn, thartmann

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

PR: https://git.openjdk.org/valhalla/pull/2219

Reply via email to