@@ -4443,30 +4443,6 @@ void LibraryCallKit::arraycopy_move_allocation_here(AllocateArrayNode* alloc, No
44434443 Node* alloc_mem = alloc->in (TypeFunc::Memory);
44444444 C->gvn_replace_by (callprojs.fallthrough_ioproj , alloc->in (TypeFunc::I_O));
44454445 C->gvn_replace_by (init->proj_out (TypeFunc::Memory), alloc_mem);
4446-
4447- // The CastIINode created in GraphKit::new_array (in AllocateArrayNode::make_ideal_length) must stay below
4448- // the allocation (i.e. is only valid if the allocation succeeds):
4449- // 1) replace CastIINode with AllocateArrayNode's length here
4450- // 2) Create CastIINode again once allocation has moved (see below) at the end of this method
4451- Node* init_control = init->proj_out (TypeFunc::Control);
4452- Node* alloc_length = alloc->Ideal_length ();
4453- #ifdef ASSERT
4454- Node* prev_cast = NULL ;
4455- #endif
4456- for (uint i = 0 ; i < init_control->outcnt (); i++) {
4457- Node *init_out = init_control->raw_out (i);
4458- if (init_out->is_CastII () && init_out->in (0 ) == init_control && init_out->in (1 ) == alloc_length) {
4459- #ifdef ASSERT
4460- if (prev_cast == NULL ) {
4461- prev_cast = init_out;
4462- assert (_gvn.hash_find (prev_cast) != NULL , " not found" );
4463- } else {
4464- assert (_gvn.hash_find (prev_cast) == _gvn.hash_find (init_out), " not equal CastIINode" );
4465- }
4466- #endif
4467- C->gvn_replace_by (init_out, alloc_length);
4468- }
4469- }
44704446 C->gvn_replace_by (init->proj_out (TypeFunc::Control), alloc->in (0 ));
44714447
44724448 // move the allocation here (after the guards)
@@ -4498,18 +4474,6 @@ void LibraryCallKit::arraycopy_move_allocation_here(AllocateArrayNode* alloc, No
44984474 dest->set_req (0 , control ());
44994475 Node* destx = _gvn.transform (dest);
45004476 assert (destx == dest, " where has the allocation result gone?" );
4501-
4502- // Cast length on remaining path to be as narrow as possible
4503- // previous CastNode inserted when creating AllocateArrayNode
4504- // is removed in early step in LibraryCallKit::inline_arraycopy
4505- Node* length = alloc->in (AllocateNode::ALength);
4506- if (map ()->find_edge (length) >= 0 ) {
4507- Node* ccast = alloc->make_ideal_length (ary_type, &_gvn);
4508- if (ccast != length) {
4509- ccast = _gvn.transform (ccast);
4510- replace_in_map (length, ccast);
4511- }
4512- }
45134477 }
45144478}
45154479
0 commit comments