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

Johannes Graham duke at openjdk.org
Thu Jan 23 19:03:47 UTC 2025


On Thu, 23 Jan 2025 16:25:50 GMT, Johannes Graham <duke at openjdk.org> wrote:

>>> There is no need to check `_hi` here.
>> 
>> If hi=0, then round_down_power_of_2(hi) would be a problem. Though if both lo and hi are 0, then it'd be a constant and wouldn't get here - is that the idea?
>
> 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

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

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


More information about the hotspot-compiler-dev mailing list