hotspot/src/share/vm/opto/loopTransform.cpp
changeset 21526 03b4acedb351
parent 21208 2ae445f57ac6
child 22851 4c4b6a45be43
child 22234 da823d78ad65
--- a/hotspot/src/share/vm/opto/loopTransform.cpp	Tue Nov 05 00:59:30 2013 -0800
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp	Tue Nov 05 01:57:18 2013 -0800
@@ -1964,7 +1964,7 @@
       // Find loads off the surviving projection; remove their control edge
       for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
         Node* cd = dp->fast_out(i); // Control-dependent node
-        if( cd->is_Load() ) {   // Loads can now float around in the loop
+        if (cd->is_Load() && cd->depends_only_on_test()) {   // Loads can now float around in the loop
           // Allow the load to float around in the loop, or before it
           // but NOT before the pre-loop.
           _igvn.replace_input_of(cd, 0, ctrl); // ctrl, not NULL