diff -r 6ae7a1561b53 -r e3cbc9ddd434 src/share/vm/opto/macro.cpp --- a/src/share/vm/opto/macro.cpp Tue Jun 28 15:04:39 2011 -0700 +++ b/src/share/vm/opto/macro.cpp Tue Jun 28 15:24:29 2011 -0700 @@ -391,13 +391,9 @@ } } // Check if an appropriate new value phi already exists. - Node* new_phi = NULL; - uint size = value_phis->size(); - for (uint i=0; i < size; i++) { - if ( mem->_idx == value_phis->index_at(i) ) { - return value_phis->node_at(i); - } - } + Node* new_phi = value_phis->find(mem->_idx); + if (new_phi != NULL) + return new_phi; if (level <= 0) { return NULL; // Give up: phi tree too deep