src/share/vm/opto/matcher.cpp

changeset 744
eaf496ad4a14
parent 670
9c2ecc2ffb12
child 802
194b8e3a2fc4
     1.1 --- a/src/share/vm/opto/matcher.cpp	Thu Aug 28 10:22:12 2008 -0700
     1.2 +++ b/src/share/vm/opto/matcher.cpp	Thu Aug 28 23:03:55 2008 -0700
     1.3 @@ -1450,6 +1450,8 @@
     1.4    Node *leaf = s->_leaf;
     1.5    // Check for instruction or instruction chain rule
     1.6    if( rule >= _END_INST_CHAIN_RULE || rule < _BEGIN_INST_CHAIN_RULE ) {
     1.7 +    assert(C->node_arena()->contains(s->_leaf) || !has_new_node(s->_leaf),
     1.8 +           "duplicating node that's already been matched");
     1.9      // Instruction
    1.10      mach->add_req( leaf->in(0) ); // Set initial control
    1.11      // Reduce interior of complex instruction
    1.12 @@ -1872,6 +1874,12 @@
    1.13  
    1.14          // Clone addressing expressions as they are "free" in most instructions
    1.15          if( mem_op && i == MemNode::Address && mop == Op_AddP ) {
    1.16 +          if (m->in(AddPNode::Base)->Opcode() == Op_DecodeN) {
    1.17 +            // Bases used in addresses must be shared but since
    1.18 +            // they are shared through a DecodeN they may appear
    1.19 +            // to have a single use so force sharing here.
    1.20 +            set_shared(m->in(AddPNode::Base)->in(1));
    1.21 +          }
    1.22            Node *off = m->in(AddPNode::Offset);
    1.23            if( off->is_Con() ) {
    1.24              set_visited(m);  // Flag as visited now

mercurial