diff --git a/src/share/vm/opto/ifnode.cpp b/src/share/vm/opto/ifnode.cpp index a5f0f3458f6bc890555213c66bb7bd2097fa7cb5..3101455e2b2236cc6675f505ef9c9dd2c6782e67 100644 --- a/src/share/vm/opto/ifnode.cpp +++ b/src/share/vm/opto/ifnode.cpp @@ -453,6 +453,9 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) { // 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();