changeset 5454:a7a359c825fa

8066649: 8u backport for 8065618 is incorrect Summary: The new code in 8u backport should guard the execution of the following code instead of return. Reviewed-by: iveresov
author kvn
date Wed, 03 Dec 2014 17:41:47 -0800
parents 1ec29fc66504
children 5fe5dd92998b
files src/share/vm/opto/ifg.cpp
diffstat 1 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/ifg.cpp	Tue Dec 02 12:08:41 2014 -0800
+++ b/src/share/vm/opto/ifg.cpp	Wed Dec 03 17:41:47 2014 -0800
@@ -571,6 +571,7 @@
           if( !n->is_Proj() ||
               // Could also be a flags-projection of a dead ADD or such.
               (n2lidx(def) && !liveout.member(n2lidx(def)) ) ) {
+            bool remove = true;
             if (n->is_MachProj()) {
               // Don't remove KILL projections if their "defining" nodes have
               // memory effects (have SCMemProj projection node) -
@@ -583,19 +584,22 @@
               for (uint i = 0; i < cnt; i++) {
                 Node* proj = def->raw_out(i);
                 if (proj->Opcode() == Op_SCMemProj) {
-                  return false;
+                  remove = false;
+                  break;
                 }
               }
             }
-            b->_nodes.remove(j - 1);
-            if( lrgs(r)._def == n ) lrgs(r)._def = 0;
-            n->disconnect_inputs(NULL, C);
-            _cfg._bbs.map(n->_idx,NULL);
-            n->replace_by(C->top());
-            // Since yanking a Node from block, high pressure moves up one
-            hrp_index[0]--;
-            hrp_index[1]--;
-            continue;
+            if (remove) {
+              b->_nodes.remove(j - 1);
+              if( lrgs(r)._def == n ) lrgs(r)._def = 0;
+              n->disconnect_inputs(NULL, C);
+              _cfg._bbs.map(n->_idx,NULL);
+              n->replace_by(C->top());
+              // Since yanking a Node from block, high pressure moves up one
+              hrp_index[0]--;
+              hrp_index[1]--;
+              continue;
+            }
           }
 
           // Fat-projections kill many registers which cannot be used to