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

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

Commit messages:
 - Unproblemlist
 - Trying

Changes: https://git.openjdk.org/valhalla/pull/2449/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2449&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8384642
  Stats: 2 lines in 2 files changed: 1 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/valhalla/pull/2449.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2449/head:pull/2449

PR: https://git.openjdk.org/valhalla/pull/2449

Reply via email to