re PR middle-end/45098 (Missed induction variable optimization)
authorTom de Vries <tom@codesourcery.com>
Thu, 16 Jun 2011 18:00:54 +0000 (18:00 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Thu, 16 Jun 2011 18:00:54 +0000 (18:00 +0000)
2011-06-16  Tom de Vries  <tom@codesourcery.com>

PR target/45098
* gcc.target/arm/ivopts-3.c: Update test.
* gcc.target/arm/ivopts-5.c: Same.

From-SVN: r175106

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/ivopts-3.c
gcc/testsuite/gcc.target/arm/ivopts-5.c

index c54e761d720fd1ecdc6bd2b0c5e353ab084cc825..2c2d9ea452a91a1c852b712f9bf1fb80a87a2cf8 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-16  Tom de Vries  <tom@codesourcery.com>
+
+       PR target/45098
+       * gcc.target/arm/ivopts-3.c: Update test.
+       * gcc.target/arm/ivopts-5.c: Same.
+
 2011-06-16  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
 
        Revert 
index daea9474a2c0743bbc95649173760afd35daa75c..a2e7f76c9e513e2096c4cc079bd710e9c08f0879 100644 (file)
@@ -8,14 +8,8 @@ tr3 (short array[], unsigned int n)
 {
   int sum = 0;
   unsigned int x;
-  x = 0;
-  while (1)
-    {
-      sum += foo2 (&array[x]);
-      if (!(x < n))
-        break;
-      x++;
-    }
+  for (x = 0; x < n; ++x)
+    sum += foo2 (&array[x]);
   return sum;
 }
 
index c8b9f4f0e5da8f079d4c61f70ecadfcd9f1992ac..5624872559f378e6748e726b2ad58353d0f4242e 100644 (file)
@@ -8,14 +8,8 @@ tr1 (int array[], unsigned int n)
 {
   int sum = 0;
   unsigned int x;
-  x = 0;
-  while (1)
-    {
-      sum += foo (&array[x]);
-      if (!(x < n))
-        break;
-      x++;
-    }
+  for (x = 0; x < n; ++x)
+    sum += foo (&array[x]);
   return sum;
 }