Mon, 29 Sep 2014 11:46:05 -0700
8058825: EA: ConnectionGraph::split_unique_types does incorrect scalar replacement
Reviewed-by: kvn
src/share/vm/opto/escape.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/escape.cpp Mon Oct 20 10:18:17 2014 +0200 1.2 +++ b/src/share/vm/opto/escape.cpp Mon Sep 29 11:46:05 2014 -0700 1.3 @@ -2839,6 +2839,13 @@ 1.4 continue; 1.5 } 1.6 } 1.7 + 1.8 + const TypeOopPtr *t = igvn->type(n)->isa_oopptr(); 1.9 + if (t == NULL) 1.10 + continue; // not a TypeOopPtr 1.11 + if (!t->klass_is_exact()) 1.12 + continue; // not an unique type 1.13 + 1.14 if (alloc->is_Allocate()) { 1.15 // Set the scalar_replaceable flag for allocation 1.16 // so it could be eliminated. 1.17 @@ -2857,10 +2864,7 @@ 1.18 // - not determined to be ineligible by escape analysis 1.19 set_map(alloc, n); 1.20 set_map(n, alloc); 1.21 - const TypeOopPtr *t = igvn->type(n)->isa_oopptr(); 1.22 - if (t == NULL) 1.23 - continue; // not a TypeOopPtr 1.24 - const TypeOopPtr* tinst = t->cast_to_exactness(true)->is_oopptr()->cast_to_instance_id(ni); 1.25 + const TypeOopPtr* tinst = t->cast_to_instance_id(ni); 1.26 igvn->hash_delete(n); 1.27 igvn->set_type(n, tinst); 1.28 n->raise_bottom_type(tinst);