--- old/src/share/vm/opto/cfgnode.cpp 2016-03-14 11:08:26.003672549 +0100 +++ new/src/share/vm/opto/cfgnode.cpp 2016-03-14 11:08:25.943672551 +0100 @@ -1665,7 +1665,7 @@ bool uncasted = false; Node* uin = unique_input(phase, false); - if (uin == NULL) { + if (uin == NULL && can_reshape) { uncasted = true; uin = unique_input(phase, true); } @@ -1702,6 +1702,8 @@ } if (uncasted) { + // Wait until after parsing for the type information to propagate from the casts + assert(can_reshape, "Invalid during parsing"); const Type* phi_type = bottom_type(); assert(phi_type->isa_int() || phi_type->isa_ptr(), "bad phi type"); int opcode;