-
Enhancement
-
Resolution: Unresolved
-
P4
-
repo-valhalla
This currently causes test failures (failed optimizations):
@@ -390,12 +403,17 @@ InlineTypePtrNode* InlineTypeBaseNode::buffer(GraphKit* kit, bool safe_for_repla
ciInlineKlass* vk = inline_klass();
Node* klass_node = kit->makecon(TypeKlassPtr::make(vk));
Node* alloc_oop = kit->new_instance(klass_node, NULL, NULL, /* deoptimize_on_exception */ true, this);
+
+ // Mark allocation as complete to avoid useless zeroing
+ AllocateNode* alloc = AllocateNode::Ideal_allocation(alloc_oop, &kit->gvn());
+ assert(alloc != NULL && alloc->maybe_set_complete(&kit->gvn()), "");
+ alloc->initialization()->set_complete_with_arraycopy();
+
+ // Initialize the buffer
store(kit, alloc_oop, alloc_oop, vk, 0);
// Do not let stores that initialize this buffer be reordered with a subsequent
// store that would make this buffer accessible by other threads.
- AllocateNode* alloc = AllocateNode::Ideal_allocation(alloc_oop, &kit->gvn());
- assert(alloc != NULL, "must have an allocation node");
kit->insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out_or_null(AllocateNode::RawAddress));
region->init_req(2, kit->control());
@@ -390,12 +403,17 @@ InlineTypePtrNode* InlineTypeBaseNode::buffer(GraphKit* kit, bool safe_for_repla
ciInlineKlass* vk = inline_klass();
Node* klass_node = kit->makecon(TypeKlassPtr::make(vk));
Node* alloc_oop = kit->new_instance(klass_node, NULL, NULL, /* deoptimize_on_exception */ true, this);
+
+ // Mark allocation as complete to avoid useless zeroing
+ AllocateNode* alloc = AllocateNode::Ideal_allocation(alloc_oop, &kit->gvn());
+ assert(alloc != NULL && alloc->maybe_set_complete(&kit->gvn()), "");
+ alloc->initialization()->set_complete_with_arraycopy();
+
+ // Initialize the buffer
store(kit, alloc_oop, alloc_oop, vk, 0);
// Do not let stores that initialize this buffer be reordered with a subsequent
// store that would make this buffer accessible by other threads.
- AllocateNode* alloc = AllocateNode::Ideal_allocation(alloc_oop, &kit->gvn());
- assert(alloc != NULL, "must have an allocation node");
kit->insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out_or_null(AllocateNode::RawAddress));
region->init_req(2, kit->control());
- relates to
-
JDK-8215480 [lworld] C2 should use immutable memory for value type loads
- Open