< prev index next >
src/share/vm/opto/macro.cpp
Print this page
@@ -377,17 +377,29 @@
mem = mem->in(0);
Node* adr = NULL;
if (mem->is_LoadStore()) {
adr = mem->in(MemNode::Address);
} else {
- assert(mem->Opcode() == Op_EncodeISOArray, "sanity");
+ assert(mem->Opcode() == Op_EncodeISOArray ||
+ mem->Opcode() == Op_StrCompressedCopy, "sanity");
adr = mem->in(3); // Destination array
}
const TypePtr* atype = adr->bottom_type()->is_ptr();
int adr_idx = phase->C->get_alias_index(atype);
if (adr_idx == alias_idx) {
- assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
+ DEBUG_ONLY(mem->dump();)
+ assert(false, "Object is not scalar replaceable if a LoadStore node accesses its field");
+ return NULL;
+ }
+ mem = mem->in(MemNode::Memory);
+ } else if (mem->Opcode() == Op_StrInflatedCopy) {
+ Node* adr = mem->in(3); // Destination array
+ const TypePtr* atype = adr->bottom_type()->is_ptr();
+ int adr_idx = phase->C->get_alias_index(atype);
+ if (adr_idx == alias_idx) {
+ DEBUG_ONLY(mem->dump();)
+ assert(false, "Object is not scalar replaceable if a StrInflatedCopy node accesses its field");
return NULL;
}
mem = mem->in(MemNode::Memory);
} else {
return mem;
@@ -514,12 +526,14 @@
if (val == NULL) {
return NULL;
}
values.at_put(j, val);
} else if (val->Opcode() == Op_SCMemProj) {
- assert(val->in(0)->is_LoadStore() || val->in(0)->Opcode() == Op_EncodeISOArray, "sanity");
- assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
+ assert(val->in(0)->is_LoadStore() ||
+ val->in(0)->Opcode() == Op_EncodeISOArray ||
+ val->in(0)->Opcode() == Op_StrCompressedCopy, "sanity");
+ assert(false, "Object is not scalar replaceable if a LoadStore node accesses its field");
return NULL;
} else if (val->is_ArrayCopy()) {
Node* res = make_arraycopy_load(val->as_ArrayCopy(), offset, val->in(0), ft, phi_type, alloc);
if (res == NULL) {
return NULL;
< prev index next >