hotspot/src/share/vm/opto/macro.cpp
changeset 28643 a665e19ca007
parent 28039 bf5a8340bf8a
child 29086 74100114a95a
--- a/hotspot/src/share/vm/opto/macro.cpp	Thu Jan 15 11:30:13 2015 +0100
+++ b/hotspot/src/share/vm/opto/macro.cpp	Mon Jan 19 09:32:40 2015 +0100
@@ -258,14 +258,7 @@
     // Search for CastP2X->Xor->URShift->Cmp path which
     // checks if the store done to a different from the value's region.
     // And replace Cmp with #0 (false) to collapse G1 post barrier.
-    Node* xorx = NULL;
-    for (DUIterator_Fast imax, i = p2x->fast_outs(imax); i < imax; i++) {
-      Node* u = p2x->fast_out(i);
-      if (u->Opcode() == Op_XorX) {
-        xorx = u;
-        break;
-      }
-    }
+    Node* xorx = p2x->find_out_with(Op_XorX);
     assert(xorx != NULL, "missing G1 post barrier");
     Node* shift = xorx->unique_out();
     Node* cmpx = shift->unique_out();