JDK-8346664 : C2: Optimize mask check with constant offset
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-12-19
  • Updated: 2025-02-24
  • Resolved: 2025-02-17
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 25
25 b11Fixed
Related Reports
Causes :  
Relates :  
Relates :  
Description
Found this while looking at: https://mail.openjdk.org/pipermail/panama-dev/2024-December/020835.html

I believe the issue is that we optimize the pattern (base + offset) & mask when offset is a left shift but we miss the cases when offset is a constant.
Comments
Changeset: 7f3ecb4d Branch: master Author: Matthias Ernst <mernst-github@mernst.org> Date: 2025-02-17 13:07:23 +0000 URL: https://git.openjdk.org/jdk/commit/7f3ecb4d92fdb084ce632cab484cf4578487b090
17-02-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/22856 Date: 2024-12-21 14:08:02 +0000
17-01-2025