RFR: 8267332: xor value should handle bounded values [v6]
Nils Eliasson
neliasso at openjdk.java.net
Fri May 21 09:59:07 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
Nils Eliasson 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 six additional commits since the last revision:
- Merge branch 'master' into xor_bound
- Removed unnecessary check
- Updated test, fixed bound
- fixed missing test case
- Fix bounds check
- fix xor value
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4136/files
- new: https://git.openjdk.java.net/jdk/pull/4136/files/9be3b003..c3a3a612
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4136&range=05
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4136&range=04-05
Stats: 4915 lines in 203 files changed: 2431 ins; 2058 del; 426 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