hotspot/src/share/vm/opto/loopopts.cpp
changeset 33078 9452eb89c16d
parent 33062 f6b082ab565e
child 33082 c3e302e8e429
--- a/hotspot/src/share/vm/opto/loopopts.cpp	Mon Sep 21 10:51:33 2015 +0200
+++ b/hotspot/src/share/vm/opto/loopopts.cpp	Tue Sep 22 15:25:34 2015 +0200
@@ -775,13 +775,15 @@
             }
             if (u->is_Phi() && u->in(0) == n_loop->_head) {
               assert(_igvn.type(u) == Type::MEMORY, "bad phi");
-              assert(phi == NULL, "already found");
+              // multiple phis on the same slice are possible
+              if (phi != NULL) {
+                return;
+              }
               phi = u;
               continue;
             }
           }
-          phi = NULL;
-          break;
+          return;
         }
         if (phi != NULL) {
           // Nothing in the loop before the store (next iteration)