RFR: 8347645: C2: XOR bounded value handling blocks constant folding [v4]

Johannes Graham duke at openjdk.org
Thu Jan 23 19:13:48 UTC 2025


On Thu, 23 Jan 2025 19:01:34 GMT, Johannes Graham <duke at openjdk.org> wrote:

>> If one arg was (lo=0,hi=1) and the other was 0 though, it might be a problem. Depends where x ^ 0 gets simplified.
>> *edit* Your alternative version below avoids this concern.
>
> *edit2* Actually, the alternative version has an issue if either of the lo values is 0

How about this?
    ``juint max = round_up_power_of_2<juint>( (r0->_hi | r1->_hi) +1) - 1;``

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23089#discussion_r1927554356


More information about the hotspot-compiler-dev mailing list