--- old/src/share/vm/opto/library_call.cpp 2014-10-23 13:25:15.847797726 +0200 +++ new/src/share/vm/opto/library_call.cpp 2014-10-23 13:25:15.661680481 +0200 @@ -4611,6 +4611,10 @@ Node* dest_offset = argument(3); // type: int Node* length = argument(4); // type: int + // Check for allocation before we add nodes that would confuse + // tightly_coupled_allocation() + AllocateArrayNode* alloc = tightly_coupled_allocation(dest, NULL); + // The following tests must be performed // (1) src and dest are arrays. // (2) src and dest arrays must have elements of the same BasicType @@ -4784,7 +4788,6 @@ return true; } - AllocateArrayNode* alloc = tightly_coupled_allocation(dest, NULL); ArrayCopyNode* ac = ArrayCopyNode::make(this, true, src, src_offset, dest, dest_offset, length, alloc != NULL, // Create LoadRange and LoadKlass nodes for use during macro expansion here // so the compiler has a chance to eliminate them: during macro expansion,