RFR: 8267332: xor value should handle bounded values
Nils Eliasson
neliasso at openjdk.java.net
Thu May 20 21:27:59 UTC 2021
In the discussion of https://github.com/openjdk/jdk/pull/3938 a limitation in C2 was found. C2 fails to eliminate obvious bound checks for indexes that are masked with xor.
The Xor for two values that have a lower bound of zero or more, the resulting lower bound is zero.
The Xor for two values that have a upperbound above zero, the resulting upper bound is the max of the next_power_of_2-1.
Test supplied.
Please review,
Best regards,
Nils Eliasson
-------------
Commit messages:
- fix xor value
Changes: https://git.openjdk.java.net/jdk/pull/4136/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4136&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8267332
Stats: 165 lines in 2 files changed: 165 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/4136.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4136/head:pull/4136
PR: https://git.openjdk.java.net/jdk/pull/4136
More information about the hotspot-compiler-dev
mailing list