RFR: 8347645: C2: XOR bounded value handling blocks constant folding [v4]
Quan Anh Mai
qamai at openjdk.org
Thu Jan 23 19:19:48 UTC 2025
On Thu, 23 Jan 2025 19:11:11 GMT, Johannes Graham <duke at openjdk.org> wrote:
>> *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;``
Why? `r0->_hi | r1->_hi == 0` would imply `r0->_hi == 0 && r1->_hi == 0`. This means that both operands are constants and should be filtered out from the previous step already.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23089#discussion_r1927560610
More information about the hotspot-compiler-dev
mailing list