6879362: assert(!klass_is_exact(),"only non-exact klass")
authorkvn
Tue, 15 Sep 2009 19:03:39 -0700
changeset 3907 2a567f035d5c
parent 3906 6767b0c66883
child 3909 2e59fa985601
6879362: assert(!klass_is_exact(),"only non-exact klass") Summary: Do nothing for AddP node which has type not related to the type of allocated object. Reviewed-by: never
hotspot/src/share/vm/opto/escape.cpp
--- a/hotspot/src/share/vm/opto/escape.cpp	Tue Sep 15 11:09:34 2009 -0700
+++ b/hotspot/src/share/vm/opto/escape.cpp	Tue Sep 15 19:03:39 2009 -0700
@@ -524,12 +524,15 @@
   // inlining) which was not eliminated during parsing since the exactness
   // of the allocation type was not propagated to the subclass type check.
   //
+  // Or the type 't' could be not related to 'base_t' at all.
+  // It could happened when CHA type is different from MDO type on a dead path
+  // (for example, from instanceof check) which is not collapsed during parsing.
+  //
   // Do nothing for such AddP node and don't process its users since
   // this code branch will go away.
   //
   if (!t->is_known_instance() &&
-      !t->klass()->equals(base_t->klass()) &&
-      t->klass()->is_subtype_of(base_t->klass())) {
+      !base_t->klass()->is_subtype_of(t->klass())) {
      return false; // bail out
   }