< prev index next >

src/hotspot/share/gc/x/c2/xBarrierSetC2.cpp

Print this page
@@ -272,11 +272,11 @@
    Node* const src = ac->in(ArrayCopyNode::Src);
    const TypeAryPtr* ary_ptr = src->get_ptr_type()->isa_aryptr();
  
    if (ac->is_clone_array() && ary_ptr != nullptr) {
      BasicType bt = ary_ptr->elem()->array_element_basic_type();
-     if (is_reference_type(bt)) {
+     if (is_reference_type(bt) && !ary_ptr->is_flat()) {
        // Clone object array
        bt = T_OBJECT;
      } else {
        // Clone primitive array
        bt = T_LONG;
< prev index next >