* tree-ssa-threadupdate.c (def_split_header_continue_p): Do not
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Oct 2012 20:38:19 +0000 (20:38 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Oct 2012 20:38:19 +0000 (20:38 +0000)
escape the loop.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192414 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-threadupdate.c

index f628e70..8ece083 100644 (file)
@@ -1,5 +1,10 @@
 2012-10-12  Jan Hubicka <jh@suse.cz>
 
+       * tree-ssa-threadupdate.c (def_split_header_continue_p): Do not
+       escape the loop.
+
+2012-10-12  Jan Hubicka <jh@suse.cz>
+
        * web.c (web_main): Do not set DF_RD_PRUNE_DEAD_DEFS flag.
 
 2012-10-12  Aaron Gray <aaronngray.lists@gmail.com>
index 2eee50e..ad64876 100644 (file)
@@ -846,9 +846,15 @@ static bool
 def_split_header_continue_p (const_basic_block bb, const void *data)
 {
   const_basic_block new_header = (const_basic_block) data;
-  return (bb != new_header
-         && (loop_depth (bb->loop_father)
-             >= loop_depth (new_header->loop_father)));
+  const struct loop *l;
+
+  if (bb == new_header
+      || loop_depth (bb->loop_father) < loop_depth (new_header->loop_father))
+    return false;
+  for (l = bb->loop_father; l; l = loop_outer (l))
+    if (l == new_header->loop_father)
+      return true;
+  return false;
 }
 
 /* Thread jumps through the header of LOOP.  Returns true if cfg changes.