hotspot/src/share/vm/opto/graphKit.cpp
changeset 30208 ed11124f18e1
parent 30199 f99feb450c61
child 30764 fec48bf5a827
child 31035 0f0743952c41
--- a/hotspot/src/share/vm/opto/graphKit.cpp	Mon Mar 30 08:03:47 2015 +0000
+++ b/hotspot/src/share/vm/opto/graphKit.cpp	Fri Mar 27 08:58:45 2015 +0100
@@ -2530,6 +2530,11 @@
 // prior to coming here.
 Node* Phase::gen_subtype_check(Node* subklass, Node* superklass, Node** ctrl, MergeMemNode* mem, PhaseGVN* gvn) {
   Compile* C = gvn->C;
+
+  if ((*ctrl)->is_top()) {
+    return C->top();
+  }
+
   // Fast check for identical types, perhaps identical constants.
   // The types can even be identical non-constants, in cases
   // involving Array.newInstance, Object.clone, etc.
@@ -2793,6 +2798,10 @@
 Node* GraphKit::maybe_cast_profiled_obj(Node* obj,
                                         ciKlass* type,
                                         bool not_null) {
+  if (stopped()) {
+    return obj;
+  }
+
   // type == NULL if profiling tells us this object is always null
   if (type != NULL) {
     Deoptimization::DeoptReason class_reason = Deoptimization::Reason_speculate_class_check;