JDK-8316918 : Optimize conversions duplicated across phi nodes
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-09-25
  • Updated: 2025-04-09
  • Resolved: 2023-10-16
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 22
22 b20Fixed
Related Reports
Causes :  
Description
In the case that the IR contains patterns such as "Phi(ConvX2Y(A), ConvX2Y(B))", the convert that is duplicated can be pulled after the phi. This would lead to the resultant IR "ConvX2Y(Phi(A, B))" which is more compact.

This pattern is fairly widespread as it is fairly easy to generate in user code. It's also generated when a new array with a non-constant size is created, so this transformation would be pretty widely applicable.
Comments
Changeset: 36993aea Author: Jasmine Karthikeyan <jkarthikeyan@openjdk.org> Committer: Tobias Hartmann <thartmann@openjdk.org> Date: 2023-10-16 12:52:01 +0000 URL: https://git.openjdk.org/jdk/commit/36993aea9a8501f56adb48ca2ff96ccb5dbfcea1
16-10-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16036 Date: 2023-10-03 23:33:37 +0000
03-10-2023