On Mon, 18 May 2026 15:15:00 GMT, Marc Chevalier <[email protected]> wrote:

> [C2: Deep recursion with 
> cmovP_regNode::bottom_type](https://bugs.openjdk.org/browse/JDK-8379667) 
> removed
> 
> bool InstructForm::captures_bottom_type(FormDict &globals) const
> 
> But in Valhalla, we had a special case on top for `CastI2N`
> 
> https://github.com/openjdk/valhalla/blob/ef03842c0d869c7a88407a41102dacaa6a1707fa/src/hotspot/share/adlc/formssel.cpp#L781
> 
> which was removed in the merge https://github.com/openjdk/valhalla/pull/2414 
> (see 
> https://github.com/openjdk/valhalla/pull/2414/changes#diff-6faeae52c6c7f235b9f763fb9b018d072e61133a1d4a56fee82fc42311f2c4f3L781)
> 
> When the changed was backed out by [[BACKOUT] C2: Deep recursion with 
> cmovP_regNode::bottom_type](https://bugs.openjdk.org/browse/JDK-8384281) and 
> integrated in Valhalla by https://github.com/openjdk/valhalla/pull/2440 this 
> special case wasn't restored (see 
> https://github.com/openjdk/valhalla/pull/2440/changes#diff-6faeae52c6c7f235b9f763fb9b018d072e61133a1d4a56fee82fc42311f2c4f3R772-R812).
> 
> The result is that CastI2N lose their types during matching, and then, a load 
> from such a pointer can't be identified to be strict final (when loading a 
> field from a value object), which causes the addition of wrong precedence 
> edges in GCM, making the graph too cyclic.
> 
> Thanks,
> Marc
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Looks good to me, too.

-------------

Marked as reviewed by qamai (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2449#pullrequestreview-4316466542

Reply via email to