mirror of git://gcc.gnu.org/git/gcc.git
tree-loop-distribution.c (can_generate_builtin): Reject volatile stmts.
2012-05-21 Richard Guenther <rguenther@suse.de> * tree-loop-distribution.c (can_generate_builtin): Reject volatile stmts. * gcc.dg/torture/ldist-1.c: New testcase. From-SVN: r187707
This commit is contained in:
parent
6be4d3acd0
commit
8450aa9720
|
@ -1,3 +1,8 @@
|
||||||
|
2012-05-21 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
* tree-loop-distribution.c (can_generate_builtin): Reject
|
||||||
|
volatile stmts.
|
||||||
|
|
||||||
2012-05-21 Chung-Lin Tang <cltang@codesourcery.com>
|
2012-05-21 Chung-Lin Tang <cltang@codesourcery.com>
|
||||||
|
|
||||||
* Makefile.in (options.c): Add options.h to included header
|
* Makefile.in (options.c): Add options.h to included header
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2012-05-21 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
* gcc.dg/torture/ldist-1.c: New testcase.
|
||||||
|
|
||||||
2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
|
2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gnat.dg/lto13.adb: New test.
|
* gnat.dg/lto13.adb: New test.
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-ftree-loop-distribute-patterns" } */
|
||||||
|
|
||||||
|
void foo (volatile int *p, int n)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < n; ++i)
|
||||||
|
p[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* { dg-final { scan-assembler-not "memset" } } */
|
||||||
|
/* { dg-final { cleanup-tree-dump "ldist" } } */
|
|
@ -822,8 +822,10 @@ can_generate_builtin (struct graph *rdg, bitmap partition)
|
||||||
nb_reads++;
|
nb_reads++;
|
||||||
else if (RDG_MEM_WRITE_STMT (rdg, i))
|
else if (RDG_MEM_WRITE_STMT (rdg, i))
|
||||||
{
|
{
|
||||||
|
gimple stmt = RDG_STMT (rdg, i);
|
||||||
nb_writes++;
|
nb_writes++;
|
||||||
if (stmt_with_adjacent_zero_store_dr_p (RDG_STMT (rdg, i)))
|
if (!gimple_has_volatile_ops (stmt)
|
||||||
|
&& stmt_with_adjacent_zero_store_dr_p (stmt))
|
||||||
stores_zero++;
|
stores_zero++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue