--- old/src/share/vm/opto/ifnode.cpp 2015-10-06 09:57:32.398077492 +0200 +++ new/src/share/vm/opto/ifnode.cpp 2015-10-06 09:57:32.322077496 +0200 @@ -1625,6 +1625,17 @@ return this; } +Node* IfProjNode::Ideal(PhaseGVN* phase, bool can_reshape) { + const Type* t = phase->type(in(0)); + if (in(0)->outcnt() == 2 && t != Type::TOP && always_taken(t->is_tuple())) { + // cut off dead branch if this branch is always taken + Node* other = in(0)->as_If()->proj_out(!is_IfTrue()); + other->set_req(0, phase->C->top()); + return this; + } + return NULL; +} + #ifndef PRODUCT //-------------------------------related--------------------------------------- // An IfProjNode's related node set consists of its input (an IfNode) including