diff src/share/vm/opto/loopopts.cpp @ 367:194b8e3a2fc4

6384206: Phis which are later unneeded are impairing our ability to inline based on static types Reviewed-by: rasbold, jrose
author never
date Wed, 17 Sep 2008 12:59:52 -0700
parents 60bc5071073f
children ee8f06bfb27c
line wrap: on
line diff
--- a/src/share/vm/opto/loopopts.cpp	Wed Sep 17 08:29:17 2008 -0700
+++ b/src/share/vm/opto/loopopts.cpp	Wed Sep 17 12:59:52 2008 -0700
@@ -2667,6 +2667,10 @@
   // Fix this by adjusting to use the post-increment trip counter.
   Node *phi = cl->phi();
   if( !phi ) return;            // Dead infinite loop
+
+  // Shape messed up, probably by iteration_split_impl
+  if (phi->in(LoopNode::LoopBackControl) != cl->incr()) return;
+
   bool progress = true;
   while (progress) {
     progress = false;