Commit 7aab672f by Tom de Vries Committed by Tom de Vries

Handle simple latch in expand_omp_for_generic

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/67476
	* omp-low.c (expand_omp_for_generic): Handle simple latch.

From-SVN: r228717
parent 9371aecc
2015-10-12 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/67476
* omp-low.c (expand_omp_for_generic): Handle simple latch.
2015-10-12 Christophe Lyon <christophe.lyon@linaro.org> 2015-10-12 Christophe Lyon <christophe.lyon@linaro.org>
* config/aarch64/aarch64-simd-builtins.def: Update builtins * config/aarch64/aarch64-simd-builtins.def: Update builtins
...@@ -6162,7 +6162,9 @@ expand_omp_for_generic (struct omp_region *region, ...@@ -6162,7 +6162,9 @@ expand_omp_for_generic (struct omp_region *region,
if (!broken_loop) if (!broken_loop)
{ {
l2_bb = create_empty_bb (cont_bb); l2_bb = create_empty_bb (cont_bb);
gcc_assert (BRANCH_EDGE (cont_bb)->dest == l1_bb); gcc_assert (BRANCH_EDGE (cont_bb)->dest == l1_bb
|| (single_succ_edge (BRANCH_EDGE (cont_bb)->dest)->dest
== l1_bb));
gcc_assert (EDGE_COUNT (cont_bb->succs) == 2); gcc_assert (EDGE_COUNT (cont_bb->succs) == 2);
} }
else else
...@@ -6438,6 +6440,11 @@ expand_omp_for_generic (struct omp_region *region, ...@@ -6438,6 +6440,11 @@ expand_omp_for_generic (struct omp_region *region,
make_edge (cont_bb, l2_bb, EDGE_FALSE_VALUE); make_edge (cont_bb, l2_bb, EDGE_FALSE_VALUE);
add_bb_to_loop (l2_bb, cont_bb->loop_father); add_bb_to_loop (l2_bb, cont_bb->loop_father);
e = find_edge (cont_bb, l1_bb); e = find_edge (cont_bb, l1_bb);
if (e == NULL)
{
e = BRANCH_EDGE (cont_bb);
gcc_assert (single_succ (e->dest) == l1_bb);
}
if (gimple_omp_for_combined_p (fd->for_stmt)) if (gimple_omp_for_combined_p (fd->for_stmt))
{ {
remove_edge (e); remove_edge (e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment