< prev index next >
src/hotspot/share/opto/library_call.cpp
Print this page
@@ -2523,10 +2523,19 @@
}
if (type == T_ADDRESS) {
p = gvn().transform(new CastP2XNode(NULL, p));
p = ConvX2UL(p);
}
+ if (value_type->is_valuetypeptr()) {
+ // Load a non-flattened value type from memory
+ assert(!field->is_flattened(), "unsafe value type load from flattened field");
+ if (value_type->value_klass()->is_scalarizable()) {
+ p = ValueTypeNode::make_from_oop(this, p, value_type->value_klass(), /* buffer_check */ false, /* null2default */ field->is_flattenable());
+ } else if (gvn().type(p)->maybe_null()) {
+ p = filter_null(p, field->is_flattenable(), value_type->value_klass());
+ }
+ }
// The load node has the control of the preceding MemBarCPUOrder. All
// following nodes will have the control of the MemBarCPUOrder inserted at
// the end of this method. So, pushing the load onto the stack at a later
// point is fine.
set_result(p);
@@ -3930,11 +3939,11 @@
PhiNode* result_val = new PhiNode(result_reg, TypeInt::INT);
PhiNode* result_io = new PhiNode(result_reg, Type::ABIO);
PhiNode* result_mem = new PhiNode(result_reg, Type::MEMORY, TypePtr::BOTTOM);
Node* obj = argument(0);
- if (obj->is_ValueType()) {
+ if (obj->is_ValueType() || gvn().type(obj)->is_valuetypeptr()) {
return false;
}
if (!is_static) {
// Check for hashing null object
< prev index next >