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
+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
+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.
--- /dev/null
+/* { 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" } } */
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++;
}