diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-03 11:38:04 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-03 11:38:04 +0000 |
commit | 35c67c833b78806f818339542f2db310b18349bd (patch) | |
tree | 89c43a99b22d5e7d34c2934ec55d1719cf2bab3a /gcc/tree-ssa-threadupdate.c | |
parent | bc05341c10553db8c7abbe942dc5f6e683450a24 (diff) | |
download | gcc-35c67c833b78806f818339542f2db310b18349bd.tar.gz |
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: svn+ssh://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.c | 6 |
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; |