< prev index next >
src/hotspot/share/opto/macroArrayCopy.cpp
Print this page
@@ -550,11 +550,11 @@
}
}
// At this point we know we do not need type checks on oop stores.
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
- if (alloc != NULL && !bs->array_copy_requires_gc_barriers(copy_type)) {
+ if (!bs->array_copy_requires_gc_barriers(alloc != NULL, copy_type, false, BarrierSetC2::Expansion)) {
// If we do not need gc barriers, copy using the jint or jlong stub.
copy_type = LP64_ONLY(UseCompressedOops ? T_INT : T_LONG) NOT_LP64(T_INT);
assert(type2aelembytes(basic_elem_type) == type2aelembytes(copy_type),
"sizes agree");
}
@@ -1125,13 +1125,10 @@
const TypePtr* adr_type = _igvn.type(dest)->is_oopptr()->add_offset(Type::OffsetBot);
if (ac->_dest_type != TypeOopPtr::BOTTOM) {
adr_type = ac->_dest_type->add_offset(Type::OffsetBot)->is_ptr();
}
- if (ac->_src_type != ac->_dest_type) {
- adr_type = TypeRawPtr::BOTTOM;
- }
generate_arraycopy(ac, alloc, &ctrl, merge_mem, &io,
adr_type, T_OBJECT,
src, src_offset, dest, dest_offset, length,
true, !ac->is_copyofrange());
< prev index next >