From 78623c95f2a3954384963c4c761d2e4e5f4aefed Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Fri, 5 Jan 2024 11:13:34 +0000 Subject: [PATCH] 8323012: C2 fails with fatal error: no reachable node should have no use Reviewed-by: chagedorn --- src/hotspot/share/opto/cfgnode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/opto/cfgnode.cpp b/src/hotspot/share/opto/cfgnode.cpp index 772e4050987..5362a7b0751 100644 --- a/src/hotspot/share/opto/cfgnode.cpp +++ b/src/hotspot/share/opto/cfgnode.cpp @@ -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);