diff -r ca717cbbd8b1 -r e54bf58b34b3 src/share/vm/opto/ifnode.cpp --- 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();