863 864 intptr_t src_off_con = (intptr_t) _igvn.find_int_con(src_offset, -1); 865 intptr_t dest_off_con = (intptr_t) _igvn.find_int_con(dest_offset, -1); 866 if (src_off_con < 0 || dest_off_con < 0) { 867 // At present, we can only understand constants. 868 return false; 869 } 870 871 intptr_t src_off = abase + (src_off_con << scale); 872 intptr_t dest_off = abase + (dest_off_con << scale); 873 874 if (((src_off | dest_off) & (BytesPerLong-1)) != 0) { 875 // Non-aligned; too bad. 876 // One more chance: Pick off an initial 32-bit word. 877 // This is a common case, since abase can be odd mod 8. 878 if (((src_off | dest_off) & (BytesPerLong-1)) == BytesPerInt && 879 ((src_off ^ dest_off) & (BytesPerLong-1)) == 0) { 880 Node* sptr = basic_plus_adr(src, src_off); 881 Node* dptr = basic_plus_adr(dest, dest_off); 882 uint alias_idx = C->get_alias_index(adr_type); 883 Node* sval = transform_later(LoadNode::make(_igvn, *ctrl, (*mem)->memory_at(alias_idx), sptr, adr_type, TypeInt::INT, T_INT, MemNode::unordered)); 884 Node* st = transform_later(StoreNode::make(_igvn, *ctrl, (*mem)->memory_at(alias_idx), dptr, adr_type, sval, T_INT, MemNode::unordered)); 885 (*mem)->set_memory_at(alias_idx, st); 886 src_off += BytesPerInt; 887 dest_off += BytesPerInt; 888 } else { 889 return false; 890 } 891 } 892 assert(src_off % BytesPerLong == 0, ""); 893 assert(dest_off % BytesPerLong == 0, ""); 894 895 // Do this copy by giant steps. 896 Node* sptr = basic_plus_adr(src, src_off); 897 Node* dptr = basic_plus_adr(dest, dest_off); 898 Node* countx = dest_size; 899 countx = transform_later(new SubXNode(countx, MakeConX(dest_off))); 900 countx = transform_later(new URShiftXNode(countx, intcon(LogBytesPerLong))); 901 902 bool disjoint_bases = true; // since alloc != NULL 903 generate_unchecked_arraycopy(ctrl, mem, 904 adr_type, T_LONG, disjoint_bases, | 863 864 intptr_t src_off_con = (intptr_t) _igvn.find_int_con(src_offset, -1); 865 intptr_t dest_off_con = (intptr_t) _igvn.find_int_con(dest_offset, -1); 866 if (src_off_con < 0 || dest_off_con < 0) { 867 // At present, we can only understand constants. 868 return false; 869 } 870 871 intptr_t src_off = abase + (src_off_con << scale); 872 intptr_t dest_off = abase + (dest_off_con << scale); 873 874 if (((src_off | dest_off) & (BytesPerLong-1)) != 0) { 875 // Non-aligned; too bad. 876 // One more chance: Pick off an initial 32-bit word. 877 // This is a common case, since abase can be odd mod 8. 878 if (((src_off | dest_off) & (BytesPerLong-1)) == BytesPerInt && 879 ((src_off ^ dest_off) & (BytesPerLong-1)) == 0) { 880 Node* sptr = basic_plus_adr(src, src_off); 881 Node* dptr = basic_plus_adr(dest, dest_off); 882 uint alias_idx = C->get_alias_index(adr_type); 883 bool is_mismatched = (basic_elem_type != T_INT); 884 Node* sval = transform_later( 885 LoadNode::make(_igvn, *ctrl, (*mem)->memory_at(alias_idx), sptr, adr_type, 886 TypeInt::INT, T_INT, MemNode::unordered, LoadNode::DependsOnlyOnTest, 887 false /*unaligned*/, is_mismatched)); 888 Node* st = transform_later( 889 StoreNode::make(_igvn, *ctrl, (*mem)->memory_at(alias_idx), dptr, adr_type, 890 sval, T_INT, MemNode::unordered)); 891 (*mem)->set_memory_at(alias_idx, st); 892 src_off += BytesPerInt; 893 dest_off += BytesPerInt; 894 } else { 895 return false; 896 } 897 } 898 assert(src_off % BytesPerLong == 0, ""); 899 assert(dest_off % BytesPerLong == 0, ""); 900 901 // Do this copy by giant steps. 902 Node* sptr = basic_plus_adr(src, src_off); 903 Node* dptr = basic_plus_adr(dest, dest_off); 904 Node* countx = dest_size; 905 countx = transform_later(new SubXNode(countx, MakeConX(dest_off))); 906 countx = transform_later(new URShiftXNode(countx, intcon(LogBytesPerLong))); 907 908 bool disjoint_bases = true; // since alloc != NULL 909 generate_unchecked_arraycopy(ctrl, mem, 910 adr_type, T_LONG, disjoint_bases, |