1.1 --- a/src/share/vm/opto/escape.cpp Wed May 08 15:08:01 2013 -0700 1.2 +++ b/src/share/vm/opto/escape.cpp Thu May 09 17:28:04 2013 -0700 1.3 @@ -484,6 +484,9 @@ 1.4 Node* adr = n->in(MemNode::Address); 1.5 const Type *adr_type = igvn->type(adr); 1.6 adr_type = adr_type->make_ptr(); 1.7 + if (adr_type == NULL) { 1.8 + break; // skip dead nodes 1.9 + } 1.10 if (adr_type->isa_oopptr() || 1.11 (opcode == Op_StoreP || opcode == Op_StoreN || opcode == Op_StoreNKlass) && 1.12 (adr_type == TypeRawPtr::NOTNULL && 1.13 @@ -676,14 +679,18 @@ 1.14 case Op_GetAndSetP: 1.15 case Op_GetAndSetN: { 1.16 Node* adr = n->in(MemNode::Address); 1.17 - if (opcode == Op_GetAndSetP || opcode == Op_GetAndSetN) { 1.18 - const Type* t = _igvn->type(n); 1.19 - if (t->make_ptr() != NULL) { 1.20 - add_local_var_and_edge(n, PointsToNode::NoEscape, adr, NULL); 1.21 - } 1.22 - } 1.23 const Type *adr_type = _igvn->type(adr); 1.24 adr_type = adr_type->make_ptr(); 1.25 +#ifdef ASSERT 1.26 + if (adr_type == NULL) { 1.27 + n->dump(1); 1.28 + assert(adr_type != NULL, "dead node should not be on list"); 1.29 + break; 1.30 + } 1.31 +#endif 1.32 + if (opcode == Op_GetAndSetP || opcode == Op_GetAndSetN) { 1.33 + add_local_var_and_edge(n, PointsToNode::NoEscape, adr, NULL); 1.34 + } 1.35 if (adr_type->isa_oopptr() || 1.36 (opcode == Op_StoreP || opcode == Op_StoreN || opcode == Op_StoreNKlass) && 1.37 (adr_type == TypeRawPtr::NOTNULL && 1.38 @@ -1813,9 +1820,8 @@ 1.39 jobj2->ideal_node()->is_Con()) { 1.40 // Klass or String constants compare. Need to be careful with 1.41 // compressed pointers - compare types of ConN and ConP instead of nodes. 1.42 - const Type* t1 = jobj1->ideal_node()->bottom_type()->make_ptr(); 1.43 - const Type* t2 = jobj2->ideal_node()->bottom_type()->make_ptr(); 1.44 - assert(t1 != NULL && t2 != NULL, "sanity"); 1.45 + const Type* t1 = jobj1->ideal_node()->get_ptr_type(); 1.46 + const Type* t2 = jobj2->ideal_node()->get_ptr_type(); 1.47 if (t1->make_ptr() == t2->make_ptr()) { 1.48 return _pcmp_eq; 1.49 } else {