hotspot/src/share/vm/opto/macro.cpp
changeset 15242 695bb216be99
parent 14623 70c4c1be0a14
child 15874 57f16a8b609f
equal deleted inserted replaced
15241:87d217c2d183 15242:695bb216be99
   359         else
   359         else
   360           return alloc->in(TypeFunc::Memory); // It will produce zero value (see callers).
   360           return alloc->in(TypeFunc::Memory); // It will produce zero value (see callers).
   361       }
   361       }
   362       // Otherwise skip it (the call updated 'mem' value).
   362       // Otherwise skip it (the call updated 'mem' value).
   363     } else if (mem->Opcode() == Op_SCMemProj) {
   363     } else if (mem->Opcode() == Op_SCMemProj) {
   364       assert(mem->in(0)->is_LoadStore(), "sanity");
   364       mem = mem->in(0);
   365       const TypePtr* atype = mem->in(0)->in(MemNode::Address)->bottom_type()->is_ptr();
   365       Node* adr = NULL;
       
   366       if (mem->is_LoadStore()) {
       
   367         adr = mem->in(MemNode::Address);
       
   368       } else {
       
   369         assert(mem->Opcode() == Op_EncodeISOArray, "sanity");
       
   370         adr = mem->in(3); // Destination array
       
   371       }
       
   372       const TypePtr* atype = adr->bottom_type()->is_ptr();
   366       int adr_idx = Compile::current()->get_alias_index(atype);
   373       int adr_idx = Compile::current()->get_alias_index(atype);
   367       if (adr_idx == alias_idx) {
   374       if (adr_idx == alias_idx) {
   368         assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
   375         assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
   369         return NULL;
   376         return NULL;
   370       }
   377       }
   371       mem = mem->in(0)->in(MemNode::Memory);
   378       mem = mem->in(MemNode::Memory);
   372     } else {
   379     } else {
   373       return mem;
   380       return mem;
   374     }
   381     }
   375     assert(mem != orig_mem, "dead memory loop");
   382     assert(mem != orig_mem, "dead memory loop");
   376   }
   383   }
   443         if (val == NULL) {
   450         if (val == NULL) {
   444           return NULL;
   451           return NULL;
   445         }
   452         }
   446         values.at_put(j, val);
   453         values.at_put(j, val);
   447       } else if (val->Opcode() == Op_SCMemProj) {
   454       } else if (val->Opcode() == Op_SCMemProj) {
   448         assert(val->in(0)->is_LoadStore(), "sanity");
   455         assert(val->in(0)->is_LoadStore() || val->in(0)->Opcode() == Op_EncodeISOArray, "sanity");
   449         assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
   456         assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
   450         return NULL;
   457         return NULL;
   451       } else {
   458       } else {
   452 #ifdef ASSERT
   459 #ifdef ASSERT
   453         val->dump();
   460         val->dump();