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!

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

Commit messages:
 - Match test85 in PHASEIDEALLOOP2 to avoid duplicaint load_unkown_inline
 - Fix the test by specifying 'main' loop and changing count for 
LOAD_UNKOWN_INLINE
 - Reenable IR rules

Changes: https://git.openjdk.org/valhalla/pull/2219/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2219&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8370070
  Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/valhalla/pull/2219.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2219/head:pull/2219

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

Reply via email to