aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-04-03 11:38:04 +0000
committerRichard Guenther <rguenther@suse.de>2012-04-03 11:38:04 +0000
commit3d9fa4086da0b492514201e8337b3e732b58f242 (patch)
tree89c43a99b22d5e7d34c2934ec55d1719cf2bab3a /gcc/tree-ssa-threadupdate.c
parent4c375c602629d277401013259f4e03f4724be44b (diff)
2012-04-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52808 * tracer.c (tail_duplicate): Return whether we have duplicated any block. (tracer): If we have duplicated any block, cleanup the CFG. * cfghooks.c (duplicate_block): If we duplicated a loop header but not its loop, destroy the loop because it now has multiple entries. * tree-ssa-threadupdate.c (thread_through_loop_header): Tell the cfg manipulation routines we are not creating a multiple entry loop. * gcc.dg/pr52808.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 000bd3f2e40..687eee0485a 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -1004,8 +1004,12 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
basic_block *bblocks;
unsigned nblocks, i;
- /* First handle the case latch edge is redirected. */
+ /* First handle the case latch edge is redirected. We are copying
+ the loop header but not creating a multiple entry loop. Make the
+ cfg manipulation code aware of that fact. */
+ set_loop_copy (loop, loop);
loop->latch = thread_single_edge (latch);
+ set_loop_copy (loop, NULL);
gcc_assert (single_succ (loop->latch) == tgt_bb);
loop->header = tgt_bb;