Add missing phi args in create_parallel_loop

2016-01-11  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69069
	* tree-parloops.c (create_parallel_loop): Add missing phi args.

From-SVN: r232221
This commit is contained in:
Tom de Vries 2016-01-11 12:08:38 +00:00 committed by Tom de Vries
parent ca90b1ed9a
commit 1c5211b13c
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-01-11 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/69069
* tree-parloops.c (create_parallel_loop): Add missing phi args.
2016-01-11 Yuri Rumyantsev <ysrumyan@gmail.com>
PR rtl-optimization/68920

View File

@ -2086,7 +2086,12 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data,
value is not modified in the loop, and we're done with this phi. */
if (!(gimple_code (def_stmt) == GIMPLE_PHI
&& gimple_bb (def_stmt) == loop->header))
continue;
{
locus = gimple_phi_arg_location_from_edge (phi, exit);
add_phi_arg (phi, def, guard, locus);
add_phi_arg (phi, def, end, locus);
continue;
}
gphi *stmt = as_a <gphi *> (def_stmt);
def = PHI_ARG_DEF_FROM_EDGE (stmt, loop_preheader_edge (loop));