RFR: 8257182: JCK test failures in integer / long rotation tests [v2]

Christian Hagedorn chagedorn at openjdk.java.net
Thu Dec 3 12:48:13 UTC 2020


> The `RotateLeftNode::Value()` and `RotateRightNode::Value()` methods use an arithmetic instead of a logical shift due to applying the shift operator `>>` to a signed instead of an unsigned number. When, for example, rotating a negative even integer (least significant bit is 0) to the right, we should always get a positive number (most significant bit becoming 0). However, the arithmetic shift keeps the integer being negative. This lets some JCK rotation tests fail with -Xcomp.
> 
> The previously failing JCK tests work again with -Xcomp by applying this fix.
> 
> Thanks,
> Christian

Christian Hagedorn 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 three additional commits since the last revision:

 - Merge branch 'master' into JDK-8257182
 - Change unsigned int to juint
 - 8257182: JCK test failures in integer / long rotation tests

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1562/files
  - new: https://git.openjdk.java.net/jdk/pull/1562/files/b68a649a..d907f755

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

  Stats: 8678 lines in 278 files changed: 7193 ins; 788 del; 697 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1562.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1562/head:pull/1562

PR: https://git.openjdk.java.net/jdk/pull/1562


More information about the hotspot-compiler-dev mailing list