--- old/src/hotspot/share/opto/parse1.cpp 2018-05-17 16:24:12.519027978 +0200 +++ new/src/hotspot/share/opto/parse1.cpp 2018-05-17 16:24:12.267027981 +0200 @@ -2377,21 +2377,11 @@ ValueTypeNode* vt = value->as_ValueType()->allocate(this)->as_ValueType(); value = ValueTypePtrNode::make_from_value_type(_gvn, vt); } else if (phi->bottom_type()->isa_valuetype() && !value->is_ValueType()) { - Node* null_ctl = top(); - Node* not_null_obj = null_check_common(value, T_VALUETYPE, false, &null_ctl, false); - if (null_ctl != top()) { - // TODO For now, we just deoptimize if value type is NULL - PreserveJVMState pjvms(this); - set_control(null_ctl); - replace_in_map(value, null()); - inc_sp(1); - uncommon_trap(Deoptimization::Reason_null_check, Deoptimization::Action_none); - } - if (stopped()) { - value = null(); - } else { - value = ValueTypeNode::make_from_oop(this, not_null_obj, phi->bottom_type()->isa_valuetype()->value_klass()); - } + assert(value->bottom_type()->remove_speculative() == TypePtr::NULL_PTR, "Anything other than null?"); + inc_sp(1); + uncommon_trap(Deoptimization::Reason_null_check, Deoptimization::Action_none); + dec_sp(1); + return; } else { // Handle returns of oop-arrays to an arrays-of-interface return const TypeInstPtr* phi_tip;