RFR: 8347645: C2: XOR bounded value handling blocks constant folding [v26]
Johannes Graham
duke at openjdk.org
Sat Feb 1 19:33:59 UTC 2025
On Sat, 1 Feb 2025 19:27:01 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 IR tests for long, simplify tests for int
Thanks. I've done another round of format fixing. I've also simplified the IR tests so they don't try to cover as much as gtest does, and added equivalent tests for long.
I have temporarily left the more elaborate tests commented out in XorINodeIdealizationTests. I will remove them if nobody thinks they are worth keeping.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23089#issuecomment-2629081832
More information about the hotspot-compiler-dev
mailing list