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.
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.