RFR: 8347645: C2: XOR bounded value handling blocks constant folding [v2]
Johannes Graham
duke at openjdk.org
Wed Jan 22 17:14:36 UTC 2025
> 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
- move tests, add correctness checks
- Merge remote-tracking branch 'origin/xor_const' into xor_const
- move logic from Value to add_node XorL
- move logic from Value to add_node XorI
- format, copyright date
- xor const folding
- test for xor const folding
- move logic from Value to add_node XorL
- move logic from Value to add_node XorI
- format, copyright date
- ... and 2 more: https://git.openjdk.org/jdk/compare/1d03f360...fe3b4282
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23089/files
- new: https://git.openjdk.org/jdk/pull/23089/files/8ec4313c..fe3b4282
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23089&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23089&range=00-01
Stats: 28608 lines in 2537 files changed: 12727 ins; 7669 del; 8212 mod
Patch: https://git.openjdk.org/jdk/pull/23089.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23089/head:pull/23089
PR: https://git.openjdk.org/jdk/pull/23089
More information about the hotspot-compiler-dev
mailing list