hotspot/src/share/vm/opto/addnode.cpp
changeset 346 e13ccc474a28
parent 205 4069fc169258
child 670 ddf3e9583f2f
equal deleted inserted replaced
345:8a4c345e460c 346:e13ccc474a28
    68     return true;
    68     return true;
    69   }
    69   }
    70 
    70 
    71   // Convert "Load+x" into "x+Load".
    71   // Convert "Load+x" into "x+Load".
    72   // Now check for loads
    72   // Now check for loads
    73   if( in2->is_Load() ) return false;
    73   if (in2->is_Load()) {
    74   // Left is a Load and Right is not; move it right.
    74     if (!in1->is_Load()) {
    75   if( in1->is_Load() ) {
    75       // already x+Load to return
       
    76       return false;
       
    77     }
       
    78     // both are loads, so fall through to sort inputs by idx
       
    79   } else if( in1->is_Load() ) {
       
    80     // Left is a Load and Right is not; move it right.
    76     add->swap_edges(1, 2);
    81     add->swap_edges(1, 2);
    77     return true;
    82     return true;
    78   }
    83   }
    79 
    84 
    80   PhiNode *phi;
    85   PhiNode *phi;