hotspot/src/share/vm/opto/escape.cpp
changeset 2110 40e42c95ac39
parent 1613 be097ec639a2
child 2131 98f9cef66a34
--- a/hotspot/src/share/vm/opto/escape.cpp	Wed Feb 18 13:53:42 2009 -0800
+++ b/hotspot/src/share/vm/opto/escape.cpp	Thu Feb 19 17:38:53 2009 -0800
@@ -756,6 +756,16 @@
       } else {
         break;
       }
+    } else if (result->Opcode() == Op_SCMemProj) {
+      assert(result->in(0)->is_LoadStore(), "sanity");
+      const Type *at = phase->type(result->in(0)->in(MemNode::Address));
+      if (at != Type::TOP) {
+        assert (at->isa_ptr() != NULL, "pointer type required.");
+        int idx = C->get_alias_index(at->is_ptr());
+        assert(idx != alias_idx, "Object is not scalar replaceable if a LoadStore node access its field");
+        break;
+      }
+      result = result->in(0)->in(MemNode::Memory);
     }
   }
   if (result->is_Phi()) {