--- old/src/share/vm/opto/stringopts.cpp 2015-09-18 11:03:45.557264949 +0200 +++ new/src/share/vm/opto/stringopts.cpp 2015-09-18 11:03:45.469264947 +0200 @@ -822,11 +822,12 @@ } } 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 - 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"); + 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 uncommon trap"); + } ctrl = iff->in(0); } else { break; @@ -911,9 +912,18 @@ 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; }