# HG changeset patch # User kvn # Date 1246920810 25200 # Node ID 4325cdaa78adb8d5d5cd91858fce810daf0e1be2 # Parent 73dac61fe3004b2b1878cdbd4191c9555cbb98d2 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 diff -r 73dac61fe300 -r 4325cdaa78ad src/share/vm/opto/library_call.cpp --- 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());