8009460: C2compiler crash in machnode::in_regmask(unsigned int)
authorroland
Wed, 06 Mar 2013 10:28:38 +0100
changeset 15874 57f16a8b609f
parent 15873 5ce4f526e0ba
child 15875 638b3e8fbe5e
8009460: C2compiler crash in machnode::in_regmask(unsigned int) Summary: 7121140 may not correctly break the Allocate -> MemBarStoreStore link Reviewed-by: kvn
hotspot/src/share/vm/opto/compile.cpp
hotspot/src/share/vm/opto/macro.cpp
--- a/hotspot/src/share/vm/opto/compile.cpp	Tue Mar 05 18:03:36 2013 -0800
+++ b/hotspot/src/share/vm/opto/compile.cpp	Wed Mar 06 10:28:38 2013 +0100
@@ -2899,6 +2899,13 @@
       }
     }
     break;
+  case Op_MemBarStoreStore:
+    // Break the link with AllocateNode: it is no longer useful and
+    // confuses register allocation.
+    if (n->req() > MemBarNode::Precedent) {
+      n->set_req(MemBarNode::Precedent, top());
+    }
+    break;
   default:
     assert( !n->is_Call(), "" );
     assert( !n->is_Mem(), "" );
--- a/hotspot/src/share/vm/opto/macro.cpp	Tue Mar 05 18:03:36 2013 -0800
+++ b/hotspot/src/share/vm/opto/macro.cpp	Wed Mar 06 10:28:38 2013 +0100
@@ -1101,12 +1101,6 @@
   Node* klass_node        = alloc->in(AllocateNode::KlassNode);
   Node* initial_slow_test = alloc->in(AllocateNode::InitialTest);
 
-  Node* storestore = alloc->storestore();
-  if (storestore != NULL) {
-    // Break this link that is no longer useful and confuses register allocation
-    storestore->set_req(MemBarNode::Precedent, top());
-  }
-
   assert(ctrl != NULL, "must have control");
   // We need a Region and corresponding Phi's to merge the slow-path and fast-path results.
   // they will not be used if "always_slow" is set
@@ -1324,7 +1318,7 @@
         // No InitializeNode or no stores captured by zeroing
         // elimination. Simply add the MemBarStoreStore after object
         // initialization.
-        MemBarNode* mb = MemBarNode::make(C, Op_MemBarStoreStore, Compile::AliasIdxBot, fast_oop_rawmem);
+        MemBarNode* mb = MemBarNode::make(C, Op_MemBarStoreStore, Compile::AliasIdxBot);
         transform_later(mb);
 
         mb->init_req(TypeFunc::Memory, fast_oop_rawmem);