# HG changeset patch # User roland # Date 1508335599 -7200 # Wed Oct 18 16:06:39 2017 +0200 # Node ID f6ded1503e11f83820df562d5d00c2caa0067a09 # Parent 3e7702cd3f19732fc3d210e98d6ffc537faaee8f 8188223: IfNode::range_check_trap_proj() should handler dying subgraph with single if proj Reviewed-by: kvn diff --git a/src/hotspot/share/opto/ifnode.cpp b/src/hotspot/share/opto/ifnode.cpp --- a/src/hotspot/share/opto/ifnode.cpp +++ b/src/hotspot/share/opto/ifnode.cpp @@ -477,6 +477,9 @@ // if this IfNode follows a range check pattern return the projection // for the failed path ProjNode* IfNode::range_check_trap_proj(int& flip_test, Node*& l, Node*& r) { + if (outcnt() != 2) { + return NULL; + } Node* b = in(1); if (b == NULL || !b->is_Bool()) return NULL; BoolNode* bn = b->as_Bool();