# HG changeset patch # User dholmes # Date 1525134559 14400 # Node ID c63bdf53a1a73a3e3bd7a3627dc6e53c42072108 # Parent e7b0c4f65b64f0ccf11840d4e3ca2f469c6aeffd 8202399: [C1] LIRGenerator::do_CheckCast needs to exclude is_invokespecial_receiver_check() when using PatchAlot Reviewed-by: kvn Contributed-by: Vladimir Ivanov diff -r e7b0c4f65b64 -r c63bdf53a1a7 src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp --- a/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp Mon Apr 30 17:50:05 2018 -0400 +++ b/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp Mon Apr 30 20:29:19 2018 -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()); diff -r e7b0c4f65b64 -r c63bdf53a1a7 src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp --- a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp Mon Apr 30 17:50:05 2018 -0400 +++ b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp Mon Apr 30 20:29:19 2018 -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()); } diff -r e7b0c4f65b64 -r c63bdf53a1a7 src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp --- a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp Mon Apr 30 17:50:05 2018 -0400 +++ b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp Mon Apr 30 20:29:19 2018 -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). diff -r e7b0c4f65b64 -r c63bdf53a1a7 src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp --- a/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp Mon Apr 30 17:50:05 2018 -0400 +++ b/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp Mon Apr 30 20:29:19 2018 -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()); diff -r e7b0c4f65b64 -r c63bdf53a1a7 src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp --- a/src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp Mon Apr 30 17:50:05 2018 -0400 +++ b/src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp Mon Apr 30 20:29:19 2018 -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()); diff -r e7b0c4f65b64 -r c63bdf53a1a7 src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp --- a/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp Mon Apr 30 17:50:05 2018 -0400 +++ b/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp Mon Apr 30 20:29:19 2018 -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());