re PR middle-end/45098 (Missed induction variable optimization)
authorTom de Vries <tom@codesourcery.com>
Mon, 23 May 2011 07:00:02 +0000 (07:00 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 23 May 2011 07:00:02 +0000 (07:00 +0000)
2011-05-23  Tom de Vries  <tom@codesourcery.com>

PR target/45098
* gcc.target/arm/ivopts-6.c: New test.

From-SVN: r174055

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/ivopts-6.c [new file with mode: 0644]

index 015b4fae01eff50276384e4469c0721e179e1421..b1446bb7951472ffb89398109272088d2028c08e 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-23  Tom de Vries  <tom@codesourcery.com>
+
+       PR target/45098
+       * gcc.target/arm/ivopts-6.c: New test.
+
 2011-05-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/49029
diff --git a/gcc/testsuite/gcc.target/arm/ivopts-6.c b/gcc/testsuite/gcc.target/arm/ivopts-6.c
new file mode 100644 (file)
index 0000000..8a3bafb
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do assemble } */
+/* { dg-options "-Os -fdump-tree-ivopts -save-temps -marm" } */
+
+void
+tr5 (short array[], int n)
+{
+  int x;
+  if (n > 0)
+    for (x = 0; x < n; x++)
+      array[x] = 0;
+}
+
+/* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */
+/* { dg-final { object-size text <= 32 } } */
+/* { dg-final { cleanup-tree-dump "ivopts" } } */