src/share/vm/opto/macro.cpp

Print this page
rev 4233 : 8009460: C2compiler crash in machnode::in_regmask(unsigned int)
Summary: 7121140 may not correctly break the Allocate -> MemBarStoreStore link
Reviewed-by:

@@ -1099,16 +1099,10 @@
   Node* i_o  = alloc->in(TypeFunc::I_O);
   Node* size_in_bytes     = alloc->in(AllocateNode::AllocSize);
   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
   enum { slow_result_path = 1, fast_result_path = 2 };
   Node *result_region;

@@ -1322,11 +1316,11 @@
     if (init == NULL || (!init->is_complete_with_arraycopy() && !init->does_not_escape())) {
       if (init == NULL || init->req() < InitializeNode::RawStores) {
         // 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);
         mb->init_req(TypeFunc::Control, fast_oop_ctrl);
         fast_oop_ctrl = new (C) ProjNode(mb,TypeFunc::Control);