--- old/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp 2019-09-11 09:50:58.762349056 -0400 +++ new/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp 2019-09-11 09:50:58.294715434 -0400 @@ -660,7 +660,7 @@ } bool ZBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const { - return type == T_OBJECT || type == T_ARRAY; + return is_reference_type(type); } bool ZBarrierSetC2::final_graph_reshaping(Compile* compile, Node* n, uint opcode) const { @@ -1367,7 +1367,7 @@ LoadStoreNode* lsn = n->as_LoadStore(); if (lsn->has_barrier()) { BasicType bt = lsn->in(MemNode::Address)->bottom_type()->basic_type(); - assert ((bt == T_OBJECT || bt == T_ARRAY), "Sanity test"); + assert (is_reference_type(bt), "Sanity test"); insert_barrier_before_unsafe(phase, lsn); } }