RFR: 8361702: C2: assert(is_dominator(compute_early_ctrl(limit, limit_ctrl), pre_end)) failed: node pinned on loop exit test? [v7]

Roland Westrelin roland at openjdk.org
Fri Sep 12 07:27:06 UTC 2025


On Tue, 9 Sep 2025 11:56:56 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8361702
>>  - Merge branch 'master' into JDK-8361702
>>  - review
>>  - Merge branch 'master' into JDK-8361702
>>  - Update src/hotspot/share/opto/loopopts.cpp
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - Update test/hotspot/jtreg/compiler/rangechecks/TestSunkRangeFromPreLoopRCE3.java
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - Update test/hotspot/jtreg/compiler/rangechecks/TestSunkRangeFromPreLoopRCE2.java
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - Update src/hotspot/share/opto/loopopts.cpp
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - Update test/hotspot/jtreg/compiler/rangechecks/TestSunkRangeFromPreLoopRCE2.java
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - tests
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/a6afe4cc...91a7d73c
>
> src/hotspot/share/opto/loopopts.cpp line 1936:
> 
>> 1934: // Sinking a node from a pre loop to its main loop pins the node between the pre and main loops. If that node is input
>> 1935: // to a check that's eliminated by range check elimination, it becomes input to an expression that feeds into the exit
>> 1936: // test of the pre loop above the point in the graph where it's pinned.
> 
> I guess the alternative would have been not to do that RC elimination, right?
> If yes: you could finish the thought and say that we prefer to have a chance at RC elimination, rather than sinking the node out of the pre-loop.

I updated the comment based on your suggestion.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26424#discussion_r2343254430


More information about the hotspot-compiler-dev mailing list