aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-parloops.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2016-01-11 09:38:28 +0000
committerTom de Vries <vries@gcc.gnu.org>2016-01-11 09:38:28 +0000
commitd95167eef4d15a5099874990fcca5e5a19fb8b38 (patch)
treeb22a7438f476e5f3f48613ffa0779ecb9f46444b /gcc/tree-parloops.c
parent4f6403a8ce2648cb785789f444b5bbaccd415976 (diff)
downloadgcc-d95167eef4d15a5099874990fcca5e5a19fb8b38.zip
gcc-d95167eef4d15a5099874990fcca5e5a19fb8b38.tar.gz
gcc-d95167eef4d15a5099874990fcca5e5a19fb8b38.tar.bz2
Don't allow latch with phi in try_transform_to_exit_first_loop_alt
2016-01-11 Tom de Vries <tom@codesourcery.com> PR tree-optimization/69109 * tree-parloops.c (try_transform_to_exit_first_loop_alt): Don't allow latch with phi. * gcc.dg/autopar/pr69109-2.c: New test. * gcc.dg/autopar/pr69109.c: New test. From-SVN: r232212
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r--gcc/tree-parloops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index d683704..5afaaf8 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -1769,6 +1769,10 @@ try_transform_to_exit_first_loop_alt (struct loop *loop,
if (!gimple_seq_nondebug_singleton_p (bb_seq (loop->latch)))
return false;
+ /* Check whether the latch contains no phis. */
+ if (phi_nodes (loop->latch) != NULL)
+ return false;
+
/* Check whether the latch contains the loop iv increment. */
edge back = single_succ_edge (loop->latch);
edge exit = single_dom_exit (loop);