RFR: 8356176: C2 MemorySegment: missing RCE with byteSize() in Loop Exit Check inside the for Expression [v5]

Manuel Hässig mhaessig at openjdk.org
Wed Aug 13 06:54:14 UTC 2025


On Tue, 12 Aug 2025 17:13:58 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Manuel Hässig has updated the pull request incrementally with eight additional commits since the last revision:
>> 
>>  - Better documentation of profitable()
>>  - Remove vector sizes
>>  - Specify vector sizes
>>  - Merge branch 'jdk-8356176-byte-size' of github.com:mhaessig/jdk into jdk-8356176-byte-size
>>  - Add asserts
>>  - Make region a field
>>  - Even more better debug print
>>  - Remove redundant scenarios
>
> src/hotspot/share/opto/loopnode.hpp line 1686:
> 
>> 1684:       // split. This is needed when we split a node and then must also split a
>> 1685:       // dependant node, i.e. spliting a Bool node after splitting a Cmp node.
>> 1686:              policy < 0;
> 
> It seems to me that `policy < 0` actually implies `_loop_back_wins > policy`, because `policy < 0 <= _loop_back_wins`.
> 
> Maybe it is still better to keep it, so we are explicit.

I was confused about what negative valued policies do. That's why I kept it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26429#discussion_r2272249702


More information about the hotspot-compiler-dev mailing list