changeset 885:4325cdaa78ad

6857661: 64-bit server VM: assert(is_Initialize(),"invalid node class") Summary: Move the secondary raw memory barrier to the correct place in generate_arraycopy(). Reviewed-by: never
author kvn
date Mon, 06 Jul 2009 15:53:30 -0700
parents 73dac61fe300
children f0bd02f95856
files src/share/vm/opto/library_call.cpp
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/library_call.cpp	Mon Jul 06 12:54:17 2009 -0700
+++ b/src/share/vm/opto/library_call.cpp	Mon Jul 06 15:53:30 2009 -0700
@@ -4500,27 +4500,27 @@
       generate_negative_guard(copy_length, slow_region);
     }
 
+    // copy_length is 0.
     if (!stopped() && must_clear_dest) {
       Node* dest_length = alloc->in(AllocateNode::ALength);
       if (_gvn.eqv_uncast(copy_length, dest_length)
           || _gvn.find_int_con(dest_length, 1) <= 0) {
-        // There is no zeroing to do.
+        // There is no zeroing to do. No need for a secondary raw memory barrier.
       } else {
         // Clear the whole thing since there are no source elements to copy.
         generate_clear_array(adr_type, dest, basic_elem_type,
                              intcon(0), NULL,
                              alloc->in(AllocateNode::AllocSize));
+        // Use a secondary InitializeNode as raw memory barrier.
+        // Currently it is needed only on this path since other
+        // paths have stub or runtime calls as raw memory barriers.
+        InitializeNode* init = insert_mem_bar_volatile(Op_Initialize,
+                                                       Compile::AliasIdxRaw,
+                                                       top())->as_Initialize();
+        init->set_complete(&_gvn);  // (there is no corresponding AllocateNode)
       }
     }
 
-    // Use a secondary InitializeNode as raw memory barrier.
-    // Currently it is needed only on this path since other
-    // paths have stub or runtime calls as raw memory barriers.
-    InitializeNode* init = insert_mem_bar_volatile(Op_Initialize,
-                                                   Compile::AliasIdxRaw,
-                                                   top())->as_Initialize();
-    init->set_complete(&_gvn);  // (there is no corresponding AllocateNode)
-
     // Present the results of the fast call.
     result_region->init_req(zero_path, control());
     result_i_o   ->init_req(zero_path, i_o());