PR tree-optimization/66926,66951

gcc/

	PR tree-optimization/66926,66951
	* tree-vect-loop-manip.c (slpeel_tree_peel_loop_to_edge): Delete
	INNER_LOOP and fix up condition for renaming virtual operands.

gcc/testsuite/

	PR tree-optimization/66926,66951
	* gcc.dg/vect/pr66951.c: New test.

From-SVN: r226103
This commit is contained in:
Yuri Rumyantsev 2015-07-23 11:13:00 +00:00 committed by Ilya Enkovich
parent 25f05e7bf1
commit b5fd0440dc
4 changed files with 27 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2015-07-23 Yuri Rumyantsev <ysrumyan@gmail.com>
PR tree-optimization/66926,66951
* tree-vect-loop-manip.c (slpeel_tree_peel_loop_to_edge): Delete
INNER_LOOP and fix up condition for renaming virtual operands.
2015-07-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* combine.c (try_combine): Use std::swap instead of manually

View file

@ -1,3 +1,8 @@
2015-07-23 Yuri Rumyantsev <ysrumyan@gmail.com>
PR tree-optimization/66926,66951
* gcc.dg/vect/pr66951.c: New test.
2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52987

View file

@ -0,0 +1,14 @@
/* { dg-do compile } */
int a, b[16], c, d;
void
fn1 ()
{
for (; d; d++)
{
for (a = 0; a < 2; a++)
;
c ^= b[d];
}
}

View file

@ -1178,7 +1178,6 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, struct loop *scalar_loop,
int bound1, int bound2)
{
struct loop *new_loop = NULL, *first_loop, *second_loop;
struct loop *inner_loop = NULL;
edge skip_e;
tree pre_condition = NULL_TREE;
basic_block bb_before_second_loop, bb_after_second_loop;
@ -1199,9 +1198,6 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, struct loop *scalar_loop,
if (!slpeel_can_duplicate_loop_p (loop, e))
return NULL;
if (loop->inner)
inner_loop = loop->inner;
/* We might have a queued need to update virtual SSA form. As we
delete the update SSA machinery below after doing a regular
incremental SSA update during loop copying make sure we don't
@ -1237,9 +1233,8 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, struct loop *scalar_loop,
add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION);
gimple_phi_set_result (new_phi, new_vop);
FOR_EACH_IMM_USE_STMT (stmt, imm_iter, vop)
if (stmt != new_phi && gimple_bb (stmt) != loop->header
/* Do not rename PHI arguments in inner-loop. */
&& (!inner_loop || gimple_bb (stmt) != inner_loop->header))
if (stmt != new_phi
&& !flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter)
SET_USE (use_p, new_vop);
}