summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-08 08:19:50 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-08 08:19:50 +0000
commit89c8b802150d5c659fbf9f00174721e67f1db7e8 (patch)
tree6f86296669830b6ab9e81bdfbae1fea91eb3fd33 /gcc/tree-ssa-loop-manip.c
parentbd7519f035e6ceedfb511a07a6d450817681ebcc (diff)
downloadgcc-89c8b802150d5c659fbf9f00174721e67f1db7e8.tar.gz
PR tree-optimization/27872
* tree-ssa-loop-manip.c (tree_unroll_loop): Set EDGE_IRREDUCIBLE_LOOP flag on the new exit edge of the unrolled loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114482 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r--gcc/tree-ssa-loop-manip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 556264c58f4..0b29c5ee8b4 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -841,6 +841,7 @@ tree_unroll_loop (struct loops *loops, struct loop *loop, unsigned factor,
use_operand_p op;
bool ok;
unsigned est_niter;
+ unsigned irr = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP;
sbitmap wont_exit;
est_niter = expected_loop_iterations (loop);
@@ -883,7 +884,7 @@ tree_unroll_loop (struct loops *loops, struct loop *loop, unsigned factor,
loop_split_edge_with (loop_latch_edge (loop), NULL);
exit_bb = single_pred (loop->latch);
- new_exit = make_edge (exit_bb, rest, EDGE_FALSE_VALUE);
+ new_exit = make_edge (exit_bb, rest, EDGE_FALSE_VALUE | irr);
new_exit->count = loop_preheader_edge (loop)->count;
est_niter = est_niter / factor + 1;
new_exit->probability = REG_BR_PROB_BASE / est_niter;