RFR: 8267332: xor value should handle bounded values [v5]

Nils Eliasson neliasso at openjdk.java.net
Fri May 21 09:52:27 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 incrementally with one additional commit since the last revision:

  Removed unnecessary check

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4136/files
  - new: https://git.openjdk.java.net/jdk/pull/4136/files/4d856ec1..9be3b003

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4136&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4136&range=03-04

  Stats: 12 lines in 1 file changed: 0 ins; 4 del; 8 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