Commit 6e8dad05 by Richard Biener Committed by Richard Biener

re PR tree-optimization/58228 (wrong code (with vectorization?) at -O3 on x86_64-linux-gnu)

2013-08-30  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/58228
	* tree-vect-data-refs.c (vect_analyze_data_ref_access): Do not
	allow invariant loads in nested loop vectorization.

	* gcc.dg/torture/pr58228.c: New testcase.

From-SVN: r202097
parent 062ef2c8
2013-08-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/58228
* tree-vect-data-refs.c (vect_analyze_data_ref_access): Do not
allow invariant loads in nested loop vectorization.
2013-08-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/58223
* tree-loop-distribution.c (has_anti_dependence): Rename to ...
(has_anti_or_output_dependence): ... this and adjust to also
......
2013-08-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/58228
* gcc.dg/torture/pr58228.c: New testcase.
2013-08-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/58223
* gcc.dg/torture/pr58223.c: New testcase.
* gcc.dg/tree-ssa/ldist-16.c: Flip expected behavior.
......
/* { dg-do run } */
extern void abort (void);
int a[8][8] = {{1}};
int b, c, d, e;
int main ()
{
for (c = 0; c < 8; c++)
for (b = 0; b < 2; b++)
a[b + 4][c] = a[c][0];
if (a[4][4] != 1)
abort ();
return 0;
}
......@@ -2271,10 +2271,17 @@ vect_analyze_data_ref_access (struct data_reference *dr)
return false;
}
/* Allow invariant loads in loops. */
/* Allow invariant loads in not nested loops. */
if (loop_vinfo && integer_zerop (step))
{
GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) = NULL;
if (nested_in_vect_loop_p (loop, stmt))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"zero step in inner loop of nest");
return false;
}
return DR_IS_READ (dr);
}
......
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