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

Martin Doerr mdoerr at openjdk.java.net
Thu Dec 3 13:37:00 UTC 2020


On Thu, 3 Dec 2020 12:48:13 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> 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

Marked as reviewed by mdoerr (Reviewer).

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

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


More information about the hotspot-compiler-dev mailing list