JDK-8282221 : x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86
  • Submitted: 2022-02-22
  • Updated: 2024-05-15
  • Resolved: 2022-04-10
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 19
19 b18Fixed
Related Reports
Cloners :  
Cloners :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Optimize the implementation of divideUnsigned() and remainderUnsigned() methods in java.lang.Integer and java.lang.Long classes by using x86 div instruction. The current implementation (without intrinsics) uses idiv instruction. (It is also possible to further optimize the special case of negative divisors using x86 code.)
Comments
Thank for reporting the issue! I was able to reproduce it yesterday and started working on a fix for the issue. Will address this bug as early as possible.
11-04-2022

This change causes asserts when running JCK tests api/java_lang/Integer/DividingUnsigned or api/java_lang/Long/DividingUnsigned with -Xcomp: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out Created JDK-8284663, but it was already reported as JDK-8284635
11-04-2022

Changeset: 37e28aea Author: vamsi-parasa <srinivas.vamsi.parasa@intel.com> Committer: Jatin Bhateja <jbhateja@openjdk.org> Date: 2022-04-10 03:47:18 +0000 URL: https://git.openjdk.java.net/jdk/commit/37e28aea27c8d8336ddecde777e63b51a939d281
10-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7572 Date: 2022-02-22 09:24:47 +0000
22-02-2022