Merge
authorkvn
Mon, 11 Jun 2012 22:38:28 -0700
changeset 12954 80cce8f40ecf
parent 12952 a1f3ff3a89e1 (current diff)
parent 12953 39d868c36dcd (diff)
child 12955 7cb409520a04
Merge
--- a/hotspot/src/share/vm/opto/memnode.cpp	Mon Jun 11 16:47:41 2012 -0700
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Mon Jun 11 22:38:28 2012 -0700
@@ -717,6 +717,22 @@
         adr = adr->in(1);
         continue;
 
+      case Op_EncodeP:
+        // EncodeP node's control edge could be set by this method
+        // when EncodeP node depends on CastPP node.
+        //
+        // Use its control edge for memory op because EncodeP may go away
+        // later when it is folded with following or preceding DecodeN node.
+        if (adr->in(0) == NULL) {
+          // Keep looking for cast nodes.
+          adr = adr->in(1);
+          continue;
+        }
+        ccp->hash_delete(n);
+        n->set_req(MemNode::Control, adr->in(0));
+        ccp->hash_insert(n);
+        return n;
+
       case Op_CastPP:
         // If the CastPP is useless, just peek on through it.
         if( ccp->type(adr) == ccp->type(adr->in(1)) ) {