--- old/src/share/vm/opto/parse3.cpp 2016-11-16 09:06:13.170498608 +0100 +++ new/src/share/vm/opto/parse3.cpp 2016-11-16 09:06:13.098498606 +0100 @@ -180,7 +180,7 @@ bool must_assert_null = false; - if( bt == T_OBJECT ) { + if (bt == T_OBJECT || bt == T_VALUETYPE) { if (!field->type()->is_loaded()) { type = TypeInstPtr::BOTTOM; must_assert_null = true; @@ -200,6 +200,14 @@ if (support_IRIW_for_not_multiple_copy_atomic_cpu && field->is_volatile()) { insert_mem_bar(Op_MemBarVolatile); // StoreLoad barrier } + + if (type->isa_valuetypeptr()) { + // Load value type from flattened field + Node* vt = ValueTypeNode::make(_gvn, field_klass->as_value_klass(), map()->memory(), field->holder(), obj, offset); + push_node(bt, vt); + return; + } + // Build the load. // MemNode::MemOrd mo = is_vol ? MemNode::acquire : MemNode::unordered; @@ -282,6 +290,9 @@ field_type = TypeOopPtr::make_from_klass(field->type()->as_klass()); } store = store_oop_to_object(control(), obj, adr, adr_type, val, field_type, bt, mo); + } else if (bt == T_VALUETYPE) { + // Store value type to flattened field + val->as_ValueType()->store_to_field(this, field->holder(), obj, offset); } else { bool needs_atomic_access = is_vol || AlwaysAtomicAccesses; store = store_to_memory(control(), adr, val, bt, adr_type, mo, needs_atomic_access);