From: Tom de Vries Date: Thu, 16 Jun 2011 18:00:54 +0000 (+0000) Subject: re PR middle-end/45098 (Missed induction variable optimization) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a7284469c1cad3c60944abebc0199dee04b8ee4;p=gcc.git re PR middle-end/45098 (Missed induction variable optimization) 2011-06-16 Tom de Vries PR target/45098 * gcc.target/arm/ivopts-3.c: Update test. * gcc.target/arm/ivopts-5.c: Same. From-SVN: r175106 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c54e761d720..2c2d9ea452a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-06-16 Tom de Vries + + PR target/45098 + * gcc.target/arm/ivopts-3.c: Update test. + * gcc.target/arm/ivopts-5.c: Same. + 2011-06-16 Ramana Radhakrishnan Revert diff --git a/gcc/testsuite/gcc.target/arm/ivopts-3.c b/gcc/testsuite/gcc.target/arm/ivopts-3.c index daea9474a2c..a2e7f76c9e5 100644 --- a/gcc/testsuite/gcc.target/arm/ivopts-3.c +++ b/gcc/testsuite/gcc.target/arm/ivopts-3.c @@ -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; } diff --git a/gcc/testsuite/gcc.target/arm/ivopts-5.c b/gcc/testsuite/gcc.target/arm/ivopts-5.c index c8b9f4f0e5d..5624872559f 100644 --- a/gcc/testsuite/gcc.target/arm/ivopts-5.c +++ b/gcc/testsuite/gcc.target/arm/ivopts-5.c @@ -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; }