Integrated: 8257182: JCK test failures in integer / long rotation tests
Christian Hagedorn
chagedorn at openjdk.java.net
Fri Dec 4 08:15:01 UTC 2020
On Wed, 2 Dec 2020 14:04:54 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
This pull request has now been integrated.
Changeset: 4a855149
Author: Christian Hagedorn <chagedorn at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/4a855149
Stats: 94 lines in 2 files changed: 86 ins; 0 del; 8 mod
8257182: JCK test failures in integer / long rotation tests
Reviewed-by: mdoerr, vlivanov, thartmann, kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/1562
More information about the hotspot-compiler-dev
mailing list