Commit 056b0995 by Richard Biener Committed by Richard Biener

re PR middle-end/65962 (Missed vectorization of strided stores)

2015-10-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/65962
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Avoid creating loop carried dependences also for outer loops
	of the loop a use to replace is in.

	* gcc.dg/vect/vect-62.c: Adjust.

From-SVN: r229481
parent 6d27d749
2015-10-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/65962
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Avoid creating loop carried dependences also for outer loops
of the loop a use to replace is in.
2015-10-28 Richard Biener <rguenther@suse.de>
* common.opt (fchecking): New flag controlling flag_checking.
* passes.c (verify_curr_properties): Drop DEBUG_FUNCTION.
* timevar.c (timer::print): Adjust output.
2015-10-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/65962
* gcc.dg/vect/vect-62.c: Adjust.
2015-10-28 Richard Biener <rguenther@suse.de>
PR middle-end/68067
* gcc.dg/torture/pr68067-1.c: New testcase.
* gcc.dg/torture/pr68067-2.c: Likewise.
......
......@@ -33,9 +33,8 @@ int main1 ()
}
/* Multidimensional array. Aligned. The "inner" dimensions
are invariant in the inner loop. Vectorizable, but the
vectorizer detects that everything is invariant and that
the loop is better left untouched. (it should be optimized away). */
are invariant in the inner loop. The outer loop is
vectorizable after invariant/store motion. */
for (i = 0; i < N; i++)
{
for (j = 0; j < N; j++)
......@@ -65,5 +64,5 @@ int main (void)
return main1 ();
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
......@@ -4082,8 +4082,9 @@ eliminate_dom_walker::before_dom_children (basic_block b)
gimple *def_stmt = SSA_NAME_DEF_STMT (sprime);
basic_block def_bb = gimple_bb (def_stmt);
if (gimple_code (def_stmt) == GIMPLE_PHI
&& b->loop_father->header == def_bb)
&& def_bb->loop_father->header == def_bb)
{
loop_p loop = def_bb->loop_father;
ssa_op_iter iter;
tree op;
bool found = false;
......@@ -4092,9 +4093,8 @@ eliminate_dom_walker::before_dom_children (basic_block b)
affine_iv iv;
def_bb = gimple_bb (SSA_NAME_DEF_STMT (op));
if (def_bb
&& flow_bb_inside_loop_p (b->loop_father, def_bb)
&& simple_iv (b->loop_father,
b->loop_father, op, &iv, true))
&& flow_bb_inside_loop_p (loop, def_bb)
&& simple_iv (loop, loop, op, &iv, true))
{
found = true;
break;
......@@ -4110,7 +4110,7 @@ eliminate_dom_walker::before_dom_children (basic_block b)
print_generic_expr (dump_file, sprime, 0);
fprintf (dump_file, " which would add a loop"
" carried dependence to loop %d\n",
b->loop_father->num);
loop->num);
}
/* Don't keep sprime available. */
sprime = NULL_TREE;
......
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