--- old/src/share/vm/opto/macroArrayCopy.cpp 2017-04-25 16:45:36.215173060 +0200 +++ new/src/share/vm/opto/macroArrayCopy.cpp 2017-04-25 16:45:36.103173064 +0200 @@ -549,9 +549,9 @@ } // At this point we know we do not need type checks on oop stores. - // Let's see if we need card marks: - if (alloc != NULL && GraphKit::use_ReduceInitialCardMarks()) { - // If we do not need card marks, copy using the jint or jlong stub. + C2BarrierSetCodeGen* code_gen = Universe::heap()->barrier_set()->c2_code_gen(); + if (alloc != NULL && !code_gen->array_copy_requires_gc_barriers(copy_type)) { + // 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");