changeset 8710:e54bf58b34b3

8188223: IfNode::range_check_trap_proj() should handler dying subgraph with single if proj Reviewed-by: kvn
author roland
date Fri, 16 Mar 2018 15:48:15 +0100
parents ca717cbbd8b1
children 0f31f18d2241
files src/share/vm/opto/ifnode.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/ifnode.cpp	Wed Apr 04 17:16:05 2018 -0700
+++ b/src/share/vm/opto/ifnode.cpp	Fri Mar 16 15:48:15 2018 +0100
@@ -453,6 +453,9 @@
 // offset.  Return 2 if we had to negate the test.  Index is NULL if the check
 // is versus a constant.
 int IfNode::is_range_check(Node* &range, Node* &index, jint &offset) {
+  if (outcnt() != 2) {
+    return 0;
+  }
   Node* b = in(1);
   if (b == NULL || !b->is_Bool())  return 0;
   BoolNode* bn = b->as_Bool();