src/share/vm/adlc/formssel.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7063628 Cdiff src/share/vm/adlc/formssel.cpp

src/share/vm/adlc/formssel.cpp

Print this page

        

*** 3621,3631 **** // Check that the current operands/operations match assert( _opType, "Must have _opType"); assert( mNode2->_opType, "Must have _opType"); const Form *form = globals[_opType]; const Form *form2 = globals[mNode2->_opType]; ! return (form == form2); } //-------------------------- has_commutative_op ------------------------------- // Recursively check for commutative operations with subtree operands // which could be swapped. --- 3621,3651 ---- // Check that the current operands/operations match assert( _opType, "Must have _opType"); assert( mNode2->_opType, "Must have _opType"); const Form *form = globals[_opType]; const Form *form2 = globals[mNode2->_opType]; ! if( form != form2 ) { ! return false; ! } ! ! // Check that their children also match ! if (_lChild ) { ! if( !_lChild->equivalent(globals, mNode2->_lChild) ) ! return false; ! } else if (mNode2->_lChild) { ! return false; // I have NULL left child, mNode2 has non-NULL left child. ! } ! ! if (_rChild ) { ! if( !_rChild->equivalent(globals, mNode2->_rChild) ) ! return false; ! } else if (mNode2->_rChild) { ! return false; // I have NULL right child, mNode2 has non-NULL right child. ! } ! ! // We've made it through the gauntlet. ! return true; } //-------------------------- has_commutative_op ------------------------------- // Recursively check for commutative operations with subtree operands // which could be swapped.
src/share/vm/adlc/formssel.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File