JDK-8257182 : JCK test failures in integer / long rotation tests
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • CPU: x86,aarch64
  • Submitted: 2020-11-26
  • Updated: 2021-01-14
  • Resolved: 2020-12-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b28Fixed
Related Reports
Relates :  
Description
The following JCK tests show errors when running with -Xcomp -XX:-TieredCompilation since JDK-8256823 was integrated:
api/java_lang/Integer/rotateLeft:
Failed for :(80000000,1), result: 40000000 vs c0000000
api/java_lang/Integer/rotateRight:
Failed for :(80000000,1), result: 1 vs ffffffff
api/java_lang/Long/rotateLeft:
Failed for :(8000000000000000,1), result: 4000000000000000 vs c000000000000000 
api/java_lang/Long/rotateRight
Failed for :(8000000000000000,1), result: 1 vs ffffffffffffffff
Seems like the rotateLeft issues are only reproducible with debug builds on some machines.

Comments
Changeset: 4a855149 Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2020-12-04 08:10:31 +0000 URL: https://git.openjdk.java.net/jdk/commit/4a855149
04-12-2020

The problem can be traced back to executing an arithmetic shift instead of a logical shift due to using signed instead of unsigned types in the Ideal methods of RotateRight- and RotateLeftNode introduced in JDK-8248830.
01-12-2020

ILW = JCK failure, rotation tests with -Xcomp, no known workaround but disable compilation of affected method = HMM = P2
30-11-2020

Okay, thanks for clarifying.
30-11-2020

Note that all 4 test failures were observed in product build as well, but it may depend on machine properties. Some machines only show rotateRight failures.
30-11-2020