--- old/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp 2018-04-29 18:10:07.690029508 -0400 +++ new/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp 2018-04-29 18:10:06.253946572 -0400 @@ -1187,7 +1187,7 @@ LIRItem obj(x->obj(), this); CodeEmitInfo* patching_info = NULL; - if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check())) { + if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) { // must do this before locking the destination register as an oop register, // and before the obj is loaded (the latter is for deoptimization) patching_info = state_for(x, x->state_before()); --- old/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp 2018-04-29 18:10:11.866270690 -0400 +++ new/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp 2018-04-29 18:10:10.430187755 -0400 @@ -1335,7 +1335,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { LIRItem obj(x->obj(), this); CodeEmitInfo* patching_info = NULL; - if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check())) { + if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) { patching_info = state_for(x, x->state_before()); } --- old/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp 2018-04-29 18:10:16.058512796 -0400 +++ new/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp 2018-04-29 18:10:14.618429630 -0400 @@ -1068,7 +1068,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { LIRItem obj(x->obj(), this); CodeEmitInfo* patching_info = NULL; - if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check())) { + if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) { // Must do this before locking the destination register as // an oop register, and before the obj is loaded (so x->obj()->item() // is valid for creating a debug info location). --- old/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp 2018-04-29 18:10:20.318758829 -0400 +++ new/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp 2018-04-29 18:10:18.878675663 -0400 @@ -875,7 +875,7 @@ LIRItem obj(x->obj(), this); CodeEmitInfo* patching_info = NULL; - if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check())) { + if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) { // Must do this before locking the destination register as an oop register, // and before the obj is loaded (the latter is for deoptimization). patching_info = state_for (x, x->state_before()); --- old/src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp 2018-04-29 18:10:24.523001628 -0400 +++ new/src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp 2018-04-29 18:10:23.078918231 -0400 @@ -1124,7 +1124,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { LIRItem obj(x->obj(), this); CodeEmitInfo* patching_info = NULL; - if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check())) { + if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) { // must do this before locking the destination register as an oop register, // and before the obj is loaded (so x->obj()->item() is valid for creating a debug info location) patching_info = state_for(x, x->state_before()); --- old/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp 2018-04-29 18:10:28.959257826 -0400 +++ new/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp 2018-04-29 18:10:27.507173967 -0400 @@ -1314,7 +1314,7 @@ LIRItem obj(x->obj(), this); CodeEmitInfo* patching_info = NULL; - if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check())) { + if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) { // must do this before locking the destination register as an oop register, // and before the obj is loaded (the latter is for deoptimization) patching_info = state_for(x, x->state_before());