--- old/src/hotspot/share/opto/macroArrayCopy.cpp 2020-02-06 19:18:17.571549089 +0100 +++ new/src/hotspot/share/opto/macroArrayCopy.cpp 2020-02-06 19:18:17.404549104 +0100 @@ -31,6 +31,10 @@ #include "opto/macro.hpp" #include "opto/runtime.hpp" #include "utilities/align.hpp" +#if INCLUDE_SHENANDOAHGC +#include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp" +#include "gc/shenandoah/shenandoahRuntime.hpp" +#endif void PhaseMacroExpand::insert_mem_bar(Node** ctrl, Node** mem, int opcode, Node* precedent) { @@ -552,7 +556,7 @@ // 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 (alloc != NULL && !bs->array_copy_requires_gc_barriers(copy_type) && !UseShenandoahGC) { // 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),