diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-29 18:23:21 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-29 18:23:21 +0000 |
commit | 82b19557fea578166840d75f98e7a25e2f390d1d (patch) | |
tree | ceff6833d1922d30a87ed2cc8371506158699fac | |
parent | 88ff55103eb0c07b466826f31cf5248a5df50e81 (diff) | |
download | gcc-82b19557fea578166840d75f98e7a25e2f390d1d.tar.gz |
gcc/
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.
gcc/testsuite/
PR tree-optimization/39007
* gcc.dg/tree-ssa/pr39007.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143767 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr39007.c | 13 | ||||
-rw-r--r-- | gcc/tree-loop-distribution.c | 4 |
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7fc861c115..1194f97cf0c 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 942a033f40f..a52ad85a5d8 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 00000000000..94b24436d69 --- /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 1463bee93d3..8eca7c02166 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: |