Integrated: 8308749: C2 failed: regular loops only (counted loop inside infinite loop)

Emanuel Peter epeter at openjdk.org
Mon Jun 12 07:43:54 UTC 2023


On Fri, 26 May 2023 13:45:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> I found this failure with my jasm fuzzer. Have not tried to reproduce it with plain java.
> 
> I added the code above the assert, the comments explain why:
> 
> https://github.com/openjdk/jdk/blob/1fd6699e44f8caea9a1c7a8b1e946b2d1ebc0f82/src/hotspot/share/opto/loopnode.cpp#L1749-L1763
> 
> Here the graph just before the assert:
> ![image](https://github.com/openjdk/jdk/assets/32593061/7f11875d-49fb-49df-a3d8-6d4102711b01)
> 
> `120 Loop` -> need it to kick of `beautify_loop` and a second `build_loop_tree`
> `71 Region` -> inifinite loop, `NeverBranch` is inserted on first `build_loop_tree` pass. Only attached to loop tree after second `build_loop_tree`.
> `x = 81 Region` -> looks like a counted loop, but is only attached to the loop tree after `beautify_loop` in the second `build_loop_tree`.
> 
> Testing up to tier6 and stress testing. Passed.

This pull request has now been integrated.

Changeset: 6c3e621f
Author:    Emanuel Peter <epeter at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6c3e621f9818fe764501e1a72c7cf8e9803da683
Stats:     114 lines in 3 files changed: 114 ins; 0 del; 0 mod

8308749: C2 failed: regular loops only (counted loop inside infinite loop)

Reviewed-by: kvn, chagedorn

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

PR: https://git.openjdk.org/jdk/pull/14178


More information about the hotspot-compiler-dev mailing list