re PR rtl-optimization/19580 (missed load/store motion)
authorRichard Guenther <rguenther@suse.de>
Fri, 28 Mar 2008 13:44:41 +0000 (13:44 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 28 Mar 2008 13:44:41 +0000 (13:44 +0000)
2008-03-28  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/19580
* gcc.dg/tree-ssa/loop-34.c: New testcase.

From-SVN: r133683

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/loop-34.c [new file with mode: 0644]

index 3fd0aa2c65bb571c6d6d607f9f0b744520309d7f..8392cfe454cfaf0b90031d33118aa4871f507352 100644 (file)
@@ -1,3 +1,8 @@
+2008-03-28  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/19580
+       * gcc.dg/tree-ssa/loop-34.c: New testcase.
+
 2008-03-28  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/30317
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-34.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-34.c
new file mode 100644 (file)
index 0000000..4a0d1ea
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lim-details" } */
+
+int r[6];
+
+void f (int n)
+{
+  while (-- n)
+    {
+      r [0] += r [5];
+      r [1] += r [0];
+      r [2] += r [1];
+      r [3] += r [2];
+      r [4] += r [3];
+      r [5] += r [4];
+    }
+}
+
+
+/* { dg-final { scan-tree-dump-times "Executing store motion of r" 6 "lim" } } */
+/* { dg-final { cleanup-tree-dump "lim" } } */