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

Quan Anh Mai qamai at openjdk.org
Sat Feb 1 09:19:48 UTC 2025


On Sat, 1 Feb 2025 02:03:45 GMT, Johannes Graham <duke at openjdk.org> wrote:

>> C2 does not eliminate XOR nodes with constant arguments. This has a noticeable effect on `Long.expand` with a constant mask, on architectures that don't have instructions equivalent  to `PDEP` to be used in an intrinsic.
>> 
>> This patch demonstrates a potential fix to the problem, but there might well be better ways to do it.
>
> Johannes Graham has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add sanity asserts to tests

Very nice, I think the patch looks good, please do another round of style refinement. In particular, make sure that there is no white space after `(` or before `)`, and after `if` or `for` we prefer having a whitespace before the `(`.

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

PR Comment: https://git.openjdk.org/jdk/pull/23089#issuecomment-2628870825


More information about the hotspot-compiler-dev mailing list