hotspot/src/share/vm/opto/subnode.cpp
changeset 1055 f4fb9fb08038
parent 781 e1baa9c8f16f
child 1058 52be2dbbdc79
--- a/hotspot/src/share/vm/opto/subnode.cpp	Thu Jul 31 15:47:42 2008 -0700
+++ b/hotspot/src/share/vm/opto/subnode.cpp	Fri Aug 01 10:06:45 2008 -0700
@@ -681,7 +681,11 @@
 
   // Now check for LoadKlass on left.
   Node* ldk1 = in(1);
-  if (ldk1->Opcode() != Op_LoadKlass)
+  if (ldk1->is_DecodeN()) {
+    ldk1 = ldk1->in(1);
+    if (ldk1->Opcode() != Op_LoadNKlass )
+      return NULL;
+  } else if (ldk1->Opcode() != Op_LoadKlass )
     return NULL;
   // Take apart the address of the LoadKlass:
   Node* adr1 = ldk1->in(MemNode::Address);
@@ -702,7 +706,11 @@
 
   // Check for a LoadKlass from primary supertype array.
   // Any nested loadklass from loadklass+con must be from the p.s. array.
-  if (ldk2->Opcode() != Op_LoadKlass)
+  if (ldk2->is_DecodeN()) {
+    // Keep ldk2 as DecodeN since it could be used in CmpP below.
+    if (ldk2->in(1)->Opcode() != Op_LoadNKlass )
+      return NULL;
+  } else if (ldk2->Opcode() != Op_LoadKlass)
     return NULL;
 
   // Verify that we understand the situation