--- old/src/share/vm/opto/ifnode.cpp 2018-03-16 15:57:47.070437013 +0100 +++ new/src/share/vm/opto/ifnode.cpp 2018-03-16 15:57:46.379436214 +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();