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

Nils Eliasson neliasso at openjdk.java.net
Thu May 20 22:01:09 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:

  fixed missing test case

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4136/files
  - new: https://git.openjdk.java.net/jdk/pull/4136/files/5f975338..c7fecda8

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

  Stats: 1 line in 1 file changed: 1 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