--- old/src/hotspot/share/opto/callGenerator.cpp 2018-10-10 10:10:43.985239676 +0200 +++ new/src/hotspot/share/opto/callGenerator.cpp 2018-10-10 10:10:43.609051681 +0200 @@ -162,11 +162,9 @@ } _call_node = call; // Save the call node in case we need it later if (!is_static) { - if (!kit.argument(0)->is_ValueType()) { - // Make an explicit receiver null_check as part of this call. - // Since we share a map with the caller, his JVMS gets adjusted. - kit.null_check_receiver_before_call(method()); - } + // Make an explicit receiver null_check as part of this call. + // Since we share a map with the caller, his JVMS gets adjusted. + kit.null_check_receiver_before_call(method()); if (kit.stopped()) { // And dump it back to the caller, decorated with any exceptions: return kit.transfer_exceptions_into_jvms(); --- old/src/hotspot/share/opto/graphKit.cpp 2018-10-10 10:10:44.629561667 +0200 +++ new/src/hotspot/share/opto/graphKit.cpp 2018-10-10 10:10:44.297395672 +0200 @@ -1430,7 +1430,9 @@ //------------------------------cast_not_null---------------------------------- // Cast obj to not-null on this path Node* GraphKit::cast_not_null(Node* obj, bool do_replace_in_map) { - assert(!obj->is_ValueType(), "should not cast value type"); + if (obj->is_ValueType()) { + return obj; + } const Type *t = _gvn.type(obj); const Type *t_not_null = t->join_speculative(TypePtr::NOTNULL); // Object is already not-null? --- old/src/hotspot/share/opto/graphKit.hpp 2018-10-10 10:10:45.281887659 +0200 +++ new/src/hotspot/share/opto/graphKit.hpp 2018-10-10 10:10:44.917705664 +0200 @@ -681,6 +681,9 @@ // callee (with all arguments still on the stack). Node* null_check_receiver_before_call(ciMethod* callee) { assert(!callee->is_static(), "must be a virtual method"); + if (argument(0)->is_ValueType()) { + return argument(0); + } // Callsite signature can be different from actual method being called (i.e _linkTo* sites). // Use callsite signature always. ciMethod* declared_method = method()->get_method_at_bci(bci()); --- old/src/hotspot/share/opto/parse1.cpp 2018-10-10 10:10:45.882187650 +0200 +++ new/src/hotspot/share/opto/parse1.cpp 2018-10-10 10:10:45.562027655 +0200 @@ -1221,9 +1221,7 @@ // If this is an inlined method, we may have to do a receiver null check. if (_caller->has_method() && is_normal_parse() && !method()->is_static()) { GraphKit kit(_caller); - if (!kit.argument(0)->is_ValueType()) { - kit.null_check_receiver_before_call(method()); - } + kit.null_check_receiver_before_call(method()); _caller = kit.transfer_exceptions_into_jvms(); if (kit.stopped()) { _exits.add_exception_states_from(_caller);