< prev index next >
src/share/vm/opto/stringopts.cpp
Print this page
@@ -820,15 +820,16 @@
iff = ctrl->in(1)->in(0)->as_If();
ctrl = iff->in(0);
}
} else if (ctrl->is_IfTrue()) { // null checks, class checks
iff = ctrl->in(0)->as_If();
- assert(iff->is_If(), "must be if");
// Verify that the other arm is an uncommon trap
+ if (iff->outcnt() == 2) {
Node* otherproj = iff->proj_out(1 - ctrl->as_Proj()->_con);
CallStaticJavaNode* call = otherproj->unique_out()->isa_CallStaticJava();
- assert(strcmp(call->_name, "uncommon_trap") == 0, "must be uncommond trap");
+ assert(strcmp(call->_name, "uncommon_trap") == 0, "must be uncommon trap");
+ }
ctrl = iff->in(0);
} else {
break;
}
}
@@ -909,13 +910,22 @@
} else if (ptr->is_CatchProj() && ctrl_path.member(ptr)) {
ptr = ptr->in(0)->in(0)->in(0);
assert(ctrl_path.member(ptr), "should be a known piece of control");
} else if (ptr->is_IfTrue()) {
IfNode* iff = ptr->in(0)->as_If();
- BoolNode* b = iff->in(1)->isa_Bool();
+ // Skip dead test
+ if (iff->in(1)->is_Con()) {
+ ptr = ptr->in(0)->in(0);
+ continue;
+ }
+ BoolNode* b = iff->in(1)->isa_Bool();
if (b == NULL) {
+#ifndef PRODUCT
+ iff->in(1)->dump();
+ assert(false, "Unexpected input to IfNode");
+#endif
fail = true;
break;
}
Node* cmp = b->in(1);
< prev index next >