8323012: C2 fails with fatal error: no reachable node should have no use

Reviewed-by: chagedorn
This commit is contained in:
Tobias Hartmann 2024-01-05 11:13:34 +00:00
parent f0e2e4311b
commit 78623c95f2

View File

@ -2170,7 +2170,7 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
cast = phase->transform(cast);
n = cast;
}
cast = new CheckCastPPNode(r, uin, phi_type, ConstraintCastNode::StrongDependency, extra_types);
cast = new CheckCastPPNode(r, n, phi_type, ConstraintCastNode::StrongDependency, extra_types);
}
if (cast == nullptr) {
cast = new CastPPNode(r, uin, phi_type, ConstraintCastNode::StrongDependency, extra_types);