RFR: 8373555: C2: Optimize redundant input calculations for sign comparisons [v2]
Hannes Greule
hgreule at openjdk.org
Mon Jan 5 08:03:11 UTC 2026
> Instead of sign-comparisons with And,Or,Xor,Max,Min nodes, we can directly compare to one of the inputs of the binary nodes if the other input is irrelevant to the comparison.
>
> There are potentially more operations, but these mentioned here are the most obvious ones. Max and Min could theoretically be expanded to arbitrary comparisons to constants, but I didn't want to introduce more complexity for now.
>
> Please let me know what you think :)
Hannes Greule has updated the pull request incrementally with one additional commit since the last revision:
update copyright year
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28782/files
- new: https://git.openjdk.org/jdk/pull/28782/files/e007f6c9..d298bf21
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28782&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28782&range=00-01
Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/28782.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28782/head:pull/28782
PR: https://git.openjdk.org/jdk/pull/28782
More information about the hotspot-compiler-dev
mailing list