From 2a7284469c1cad3c60944abebc0199dee04b8ee4 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 16 Jun 2011 18:00:54 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.target/arm/ivopts-3.c | 10 ++-------- gcc/testsuite/gcc.target/arm/ivopts-5.c | 10 ++-------- 3 files changed, 10 insertions(+), 16 deletions(-) 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; } -- 2.30.2