Commit e179190c by Richard Biener Committed by Richard Biener

tree-loop-distribution.c (tree_loop_distribution): Make sure to distribute all stores.

2013-11-15  Richard Biener  <rguenther@suse.de>

	* tree-loop-distribution.c (tree_loop_distribution): Make sure
	to distribute all stores.

	* gcc.dg/torture/20131115-1.c: New testcase.

From-SVN: r204843
parent 33512303
2013-11-15 Richard Biener <rguenther@suse.de>
* tree-loop-distribution.c (tree_loop_distribution): Make sure
to distribute all stores.
2013-11-15 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* doc/invoke.texi (-mabi=elfv1, -mabi=elfv2): Document.
2013-11-15 Richard Biener <rguenther@suse.de>
* gcc.dg/torture/20131115-1.c: New testcase.
2013-11-15 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/cpp/ucnid-9.c: New test.
......
/* { dg-do run } */
struct S { int i; };
__attribute__((const, noinline, noclone))
struct S foo (int x)
{
struct S s;
s.i = x;
return s;
}
int a[2048], b[2048], c[2048], d[2048];
struct S e[2048];
__attribute__((noinline, noclone)) void
bar (void)
{
int i;
for (i = 0; i < 1024; i++)
{
e[i] = foo (i);
a[i+2] = a[i] + a[i+1];
b[10] = b[10] + i;
c[i] = c[2047 - i];
d[i] = d[i + 1];
}
}
int
main ()
{
int i;
bar ();
for (i = 0; i < 1024; i++)
if (e[i].i != i)
__builtin_abort ();
return 0;
}
......@@ -1724,8 +1724,7 @@ tree_loop_distribution (void)
if (stmt_has_scalar_dependences_outside_loop (loop, stmt))
;
/* Otherwise only distribute stores for now. */
else if (!gimple_assign_single_p (stmt)
|| is_gimple_reg (gimple_assign_lhs (stmt)))
else if (!gimple_vdef (stmt))
continue;
work_list.safe_push (stmt);
......
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