RFR: 8332920: C2: Partial Peeling is wrongly applied for CmpU with negative limit [v4]

Christian Hagedorn chagedorn at openjdk.org
Wed Jun 5 15:18:12 UTC 2024


On Wed, 5 Jun 2024 07:04:25 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add randomized tests
>
> src/hotspot/share/opto/loopopts.cpp line 3052:
> 
>> 3050:   //   limit >= 0   (COND)
>> 3051:   // then the unsigned loop exit condition is equivalent to the signed loop exit condition
>> 3052:   //   i < 0 || i >= limit
> 
> Could we come up with an alternative equation if `limit < 0`? And maybe even a combined condition? Not sure if that is helpful, but I'd like to think about it. Could also be a follow-up RFE.

I have not thought about it, yet, but I also have a feeling that we might can do better. Since this is a P2 bug fix, I propose to do that separately in an RFE as you suggested.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19522#discussion_r1627284133


More information about the hotspot-compiler-dev mailing list