--- 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)