aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr39007.c13
-rw-r--r--gcc/tree-loop-distribution.c4
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a7fc861..1194f97 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-29 Kazu Hirata <kazu@codesourcery.com>
+
+ PR tree-optimization/39007
+ * tree-loop-distribution.c (generate_builtin): Use
+ recompute_dominator to compute the immediate dominator of the
+ basic block just after the loop.
+
2008-01-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/i386/sol2-10.h [!HAVE_AS_IX86_DIFF_SECT_DELTA]
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 942a033..a52ad85 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-29 Kazu Hirata <kazu@codesourcery.com>
+
+ PR tree-optimization/39007
+ * gcc.dg/tree-ssa/pr39007.c: New.
+
2009-01-29 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/35854
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr39007.c b/gcc/testsuite/gcc.dg/tree-ssa/pr39007.c
new file mode 100644
index 0000000..94b2443
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr39007.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribution" } */
+
+void
+foo (int *__restrict__ p, int *__restrict__ q, int count)
+{
+ int i;
+ for (i = 0; i < count; i++)
+ {
+ *p++ = 0;
+ *q++ = 0;
+ }
+}
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 1463bee..8eca7c0 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -439,11 +439,13 @@ generate_builtin (struct loop *loop, bitmap partition, bool copy_p)
basic_block dest = single_exit (loop)->dest;
prop_phis (dest);
make_edge (src, dest, EDGE_FALLTHRU);
- set_immediate_dominator (CDI_DOMINATORS, dest, src);
cancel_loop_tree (loop);
for (i = 0; i < nbbs; i++)
delete_basic_block (bbs[i]);
+
+ set_immediate_dominator (CDI_DOMINATORS, dest,
+ recompute_dominator (CDI_DOMINATORS, dest));
}
end: