mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-14 05:20:25 +08:00
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>
|
||||
|
||||
* 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>
|
||||
|
||||
* gnat.dg/lto13.adb: New test.
|
||||
|
12
gcc/testsuite/gcc.dg/torture/ldist-1.c
Normal file
12
gcc/testsuite/gcc.dg/torture/ldist-1.c
Normal file
@ -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++;
|
||||
else if (RDG_MEM_WRITE_STMT (rdg, i))
|
||||
{
|
||||
gimple stmt = RDG_STMT (rdg, i);
|
||||
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++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user