changeset 43932:685a262f474f

8144484: assert(no_dead_loop) failed: dead loop detected Summary: Bailout early without splitting Phi through memory merges if TOP inputs present for Phi Nodes Reviewed-by: thartmann, kvn
author rraghavan
date Fri, 03 Feb 2017 00:46:58 -0800
parents b31dd7e27325
children 85442814afb1
files hotspot/src/share/vm/opto/cfgnode.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/opto/cfgnode.cpp	Fri Feb 03 08:17:35 2017 +0100
+++ b/hotspot/src/share/vm/opto/cfgnode.cpp	Fri Feb 03 00:46:58 2017 -0800
@@ -1889,6 +1889,12 @@
     bool saw_self = false;
     for( uint i=1; i<req(); ++i ) {// For all paths in
       Node *ii = in(i);
+      // TOP inputs should not be counted as safe inputs because if the
+      // Phi references itself through all other inputs then splitting the
+      // Phi through memory merges would create dead loop at later stage.
+      if (ii == top) {
+        return NULL; // Delay optimization until graph is cleaned.
+      }
       if (ii->is_MergeMem()) {
         MergeMemNode* n = ii->as_MergeMem();
         merge_width = MAX2(merge_width, n->req());