src/share/vm/opto/subnode.cpp

changeset 728
c3e045194476
parent 670
9c2ecc2ffb12
child 731
ce93a51457ae
equal deleted inserted replaced
692:40b69ca33f4b 728:c3e045194476
679 // Get the constant klass we are comparing to. 679 // Get the constant klass we are comparing to.
680 ciKlass* superklass = t2->klass(); 680 ciKlass* superklass = t2->klass();
681 681
682 // Now check for LoadKlass on left. 682 // Now check for LoadKlass on left.
683 Node* ldk1 = in(1); 683 Node* ldk1 = in(1);
684 if (ldk1->Opcode() != Op_LoadKlass) 684 if (ldk1->is_DecodeN()) {
685 ldk1 = ldk1->in(1);
686 if (ldk1->Opcode() != Op_LoadNKlass )
687 return NULL;
688 } else if (ldk1->Opcode() != Op_LoadKlass )
685 return NULL; 689 return NULL;
686 // Take apart the address of the LoadKlass: 690 // Take apart the address of the LoadKlass:
687 Node* adr1 = ldk1->in(MemNode::Address); 691 Node* adr1 = ldk1->in(MemNode::Address);
688 intptr_t con2 = 0; 692 intptr_t con2 = 0;
689 Node* ldk2 = AddPNode::Ideal_base_and_offset(adr1, phase, con2); 693 Node* ldk2 = AddPNode::Ideal_base_and_offset(adr1, phase, con2);
700 } 704 }
701 } 705 }
702 706
703 // Check for a LoadKlass from primary supertype array. 707 // Check for a LoadKlass from primary supertype array.
704 // Any nested loadklass from loadklass+con must be from the p.s. array. 708 // Any nested loadklass from loadklass+con must be from the p.s. array.
705 if (ldk2->Opcode() != Op_LoadKlass) 709 if (ldk2->is_DecodeN()) {
710 // Keep ldk2 as DecodeN since it could be used in CmpP below.
711 if (ldk2->in(1)->Opcode() != Op_LoadNKlass )
712 return NULL;
713 } else if (ldk2->Opcode() != Op_LoadKlass)
706 return NULL; 714 return NULL;
707 715
708 // Verify that we understand the situation 716 // Verify that we understand the situation
709 if (con2 != (intptr_t) superklass->super_check_offset()) 717 if (con2 != (intptr_t) superklass->super_check_offset())
710 return NULL; // Might be element-klass loading from array klass 718 return NULL; // Might be element-klass loading from array klass

mercurial