< prev index next >
src/share/vm/opto/ifnode.cpp
Print this page
rev 8576 : 8188223: IfNode::range_check_trap_proj() should handler dying subgraph with single if proj
Reviewed-by: kvn
*** 451,460 ****
--- 451,463 ----
//------------------------------is_range_check---------------------------------
// Return 0 if not a range check. Return 1 if a range check and set index and
// 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();
Node* cmp = bn->in(1);
if (cmp == NULL) return 0;
< prev index next >