JDK-8285793 : C2: optimization of mask checks in counted loops fail in the presence of cast nodes
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-04-28
  • Updated: 2022-04-29
  • Resolved: 2022-04-29
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 masterFixed
Related Reports
Relates :  
Description
This showed up when working with a panama micro benchmark. Optimization of:

if ((base + (offset << 2)) & 3) != 0) {
}

into:

if ((base & 3) != 0) {

fails if the subgraph contains cast nodes.

Comments
Changeset: e98ac235 Author: Roland Westrelin <roland@openjdk.org> Date: 2022-04-29 11:19:27 +0000 URL: https://git.openjdk.java.net/jdk/commit/e98ac2355306246e69ee9991e12077c633e80a05
29-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8447 Date: 2022-04-28 09:39:18 +0000
28-04-2022