--- old/src/hotspot/cpu/x86/templateTable_x86.cpp 2018-07-09 21:39:05.672163892 -0700 +++ new/src/hotspot/cpu/x86/templateTable_x86.cpp 2018-07-09 21:39:05.400153286 -0700 @@ -2759,6 +2759,16 @@ } if (state == atos) { + Label not_returning_null_vt; + const Register method = rbx; + + __ testl(rax, rax); + __ jcc(Assembler::notZero, not_returning_null_vt); + __ get_method(method); + __ cmpb(Address(rbx, Method::flags_offset() + in_ByteSize(1)), Method::byte_value_for_known_not_returning_vt()); + __ jcc(Assembler::equal, not_returning_null_vt); + __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::deoptimize_caller_frame_for_vt), method); + __ bind(not_returning_null_vt); if (ValueTypesBufferMaxMemory > 0) { Label notBuffered;