8202399: [C1] LIRGenerator::do_CheckCast needs to exclude is_invokespecial_receiver_check() when using PatchAlot
authordholmes
Mon, 30 Apr 2018 20:29:19 -0400
changeset 49933 c63bdf53a1a7
parent 49932 e7b0c4f65b64
child 49934 44839fbb20db
8202399: [C1] LIRGenerator::do_CheckCast needs to exclude is_invokespecial_receiver_check() when using PatchAlot Reviewed-by: kvn Contributed-by: Vladimir Ivanov <vladimir.x.ivanov@oracle.com>
src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp
src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp
src/hotspot/cpu/x86/c1_LIRGenerator_x86.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());
--- 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());
   }
 
--- 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).
--- 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());
--- 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());
--- 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());