1662 ReduceInst_Chain_Rule( s, rule, mem, mach ); 1663 } 1664 1665 // If a Memory was used, insert a Memory edge 1666 if( mem != (Node*)1 ) { 1667 mach->ins_req(MemNode::Memory,mem); 1668 #ifdef ASSERT 1669 // Verify adr type after matching memory operation 1670 const MachOper* oper = mach->memory_operand(); 1671 if (oper != NULL && oper != (MachOper*)-1) { 1672 // It has a unique memory operand. Find corresponding ideal mem node. 1673 Node* m = NULL; 1674 if (leaf->is_Mem()) { 1675 m = leaf; 1676 } else { 1677 m = _mem_node; 1678 assert(m != NULL && m->is_Mem(), "expecting memory node"); 1679 } 1680 const Type* mach_at = mach->adr_type(); 1681 // DecodeN node consumed by an address may have different type 1682 // then its input. Don't compare types for such case. 1683 if (m->adr_type() != mach_at && 1684 (m->in(MemNode::Address)->is_DecodeNarrowPtr() || 1685 m->in(MemNode::Address)->is_AddP() && 1686 m->in(MemNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr() || 1687 m->in(MemNode::Address)->is_AddP() && 1688 m->in(MemNode::Address)->in(AddPNode::Address)->is_AddP() && 1689 m->in(MemNode::Address)->in(AddPNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr())) { 1690 mach_at = m->adr_type(); 1691 } 1692 if (m->adr_type() != mach_at) { 1693 m->dump(); 1694 tty->print_cr("mach:"); 1695 mach->dump(1); 1696 } 1697 assert(m->adr_type() == mach_at, "matcher should not change adr type"); 1698 } 1699 #endif 1700 } 1701 1702 // If the _leaf is an AddP, insert the base edge 1703 if (leaf->is_AddP()) { 1704 mach->ins_req(AddPNode::Base,leaf->in(AddPNode::Base)); 1705 } 1706 1707 uint number_of_projections_prior = number_of_projections(); 1708 1709 // Perform any 1-to-many expansions required | 1662 ReduceInst_Chain_Rule( s, rule, mem, mach ); 1663 } 1664 1665 // If a Memory was used, insert a Memory edge 1666 if( mem != (Node*)1 ) { 1667 mach->ins_req(MemNode::Memory,mem); 1668 #ifdef ASSERT 1669 // Verify adr type after matching memory operation 1670 const MachOper* oper = mach->memory_operand(); 1671 if (oper != NULL && oper != (MachOper*)-1) { 1672 // It has a unique memory operand. Find corresponding ideal mem node. 1673 Node* m = NULL; 1674 if (leaf->is_Mem()) { 1675 m = leaf; 1676 } else { 1677 m = _mem_node; 1678 assert(m != NULL && m->is_Mem(), "expecting memory node"); 1679 } 1680 const Type* mach_at = mach->adr_type(); 1681 // DecodeN node consumed by an address may have different type 1682 // than its input. Don't compare types for such case. 1683 if (m->adr_type() != mach_at && 1684 (m->in(MemNode::Address)->is_DecodeNarrowPtr() || 1685 (m->in(MemNode::Address)->is_AddP() && 1686 m->in(MemNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr()) || 1687 (m->in(MemNode::Address)->is_AddP() && 1688 m->in(MemNode::Address)->in(AddPNode::Address)->is_AddP() && 1689 m->in(MemNode::Address)->in(AddPNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr()))) { 1690 mach_at = m->adr_type(); 1691 } 1692 if (m->adr_type() != mach_at) { 1693 m->dump(); 1694 tty->print_cr("mach:"); 1695 mach->dump(1); 1696 } 1697 assert(m->adr_type() == mach_at, "matcher should not change adr type"); 1698 } 1699 #endif 1700 } 1701 1702 // If the _leaf is an AddP, insert the base edge 1703 if (leaf->is_AddP()) { 1704 mach->ins_req(AddPNode::Base,leaf->in(AddPNode::Base)); 1705 } 1706 1707 uint number_of_projections_prior = number_of_projections(); 1708 1709 // Perform any 1-to-many expansions required |