aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-parloops.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-02-08 15:28:01 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-02-08 15:28:01 +0000
commit31432e219f044eb7195b9f802db88ace3e7fe8a1 (patch)
tree1efa0d6fbc6e7f4dd31d427ac6c423dc2e46bc4e /gcc/tree-parloops.c
parentc51ec0a3d68c86ba9b2e2d0c61556fee8308d570 (diff)
downloadgcc-31432e219f044eb7195b9f802db88ace3e7fe8a1.zip
gcc-31432e219f044eb7195b9f802db88ace3e7fe8a1.tar.gz
gcc-31432e219f044eb7195b9f802db88ace3e7fe8a1.tar.bz2
re PR tree-optimization/46886 (wrong code with -ftree-parallelize-loops -fno-tree-ch)
2012-03-08 Richard Guenther <rguenther@suse.de> PR tree-optimization/46886 * tree-flow.h (do_while_loop_p): Declare. * tree-ssa-loop-ch.c (do_while_loop_p): Export. * tree-parloops.c (parallelize_loops): Only parallelize do-while loops. * testsuite/libgomp.c/pr46886.c: New testcase. From-SVN: r184010
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r--gcc/tree-parloops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 28c450d..221f257 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -2183,7 +2183,10 @@ parallelize_loops (void)
|| loop_has_blocks_with_irreducible_flag (loop)
|| (loop_preheader_edge (loop)->src->flags & BB_IRREDUCIBLE_LOOP)
/* FIXME: the check for vector phi nodes could be removed. */
- || loop_has_vector_phi_nodes (loop))
+ || loop_has_vector_phi_nodes (loop)
+ /* FIXME: transform_to_exit_first_loop does not handle not
+ header-copied loops correctly - see PR46886. */
+ || !do_while_loop_p (loop))
continue;
estimated = max_stmt_executions_int (loop, false);
/* FIXME: Bypass this check as graphite doesn't update the