RFR: 8336759: C2: int counted loop with long limit not recognized as counted loop
Roland Westrelin
roland at openjdk.org
Tue Dec 3 02:37:53 UTC 2024
On Fri, 29 Nov 2024 17:09:08 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> src/hotspot/share/opto/loopnode.cpp line 1668:
>>
>>> 1666:
>>> 1667: _igvn.rehash_node_delayed(bol);
>>> 1668: bol->replace_edge(cmp, new_cmp, &_igvn);
>>
>> You should use: `PhaseIdealLoop::insert_loop_limit_check_predicate()`. `do_is_counted_loop()` may need to add more loop limit checks and the way you've implemented it, I think you're replacing the place holder predicate that we use to create other ones.
>
> Actually you're not checking that it's a loop limit check so you could be replacing something else. You need to follow the pattern used elsewhere i.e.: https://github.com/openjdk/jdk/blob/2beb2b602bf20f1ec36e6244eca1a2eb50baccb4/src/hotspot/share/opto/loopnode.cpp#L2011
FTR, we discussed this offline and I was looking at the wrong location.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22449#discussion_r1866129649
More information about the hotspot-compiler-dev
mailing list