diff src/share/vm/opto/loopTransform.cpp @ 5635:94a83e0f9ce1

8017065: C2 allows safepoint checks to leak into G1 pre-barriers Summary: Make all raw loads strictly respect control dependencies, make sure RCE doesn't move raw loads, add verification of G1 pre-barriers. Reviewed-by: kvn, roland
author iveresov
date Tue, 05 Nov 2013 01:57:18 -0800
parents 60a32bb8ff99
children 55fb97c4c58d
line wrap: on
line diff
--- a/src/share/vm/opto/loopTransform.cpp	Tue Nov 05 00:59:30 2013 -0800
+++ b/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