JDK-8299857 : C2: Allow speculative Div/Mod on RISC architectures
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-01-10
  • Updated: 2023-01-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.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
C2 optimizations can lead to execution of integer Div/Mod instructions before the corresponding zero check. Changes were made to prevent this because some CISC architectures (x86, s390) raise SIGFPE when dividing by zero (see related issues).
However, some RISC architectures (PPC64, AARCH64, RISC-V?) don't raise signals and, hence, allow division speculatively before the zero check.
We should check if allowing Div/Mod instructions to float on these architectures is beneficial and possibly adapt the changes which were made for CISC architectures.