RFR: 8366888: C2: incorrect assertion predicate with short running long counted loop [v4]
Benoît Maillard
bmaillard at openjdk.org
Fri Nov 14 13:10:12 UTC 2025
On Thu, 13 Nov 2025 16:28:43 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> src/hotspot/share/opto/loopnode.cpp line 1196:
>>
>>> 1194: // for (int = 0; i < stop - start; i+= stride) { ... }
>>> 1195: // Template Assertion Predicates added so far were with an init value of start. They need to be updated with the new
>>> 1196: // init value of 0:
>>
>> Not being super familiar with assertion predicates, I was a little bit confused at first. I would maybe add something along the lines of:
>>
>> Suggestion:
>>
>> // init value of 0. We want the OpaqueLoopInit node on the zero in order to be able to replace it when cloning the predicate.
>>
>>
>> But feel free to ignore if you think this is obvious.
>
> Thanks for having a look at this. Does the updated comment look good to you?
Yes, this works for me, thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27250#discussion_r2527437488
More information about the hotspot-compiler-dev
mailing list