On 06/16/2011 08:39 AM, Tom de Vries wrote:
> I will sent the adapted test cases in a separate email.
Update 2 test cases to be more strict, and more like the original example.
Thanks,
- Tom
2011-06-15 Tom de Vries <[email protected]>
PR target/45098
* gcc.target/arm/ivopts-3.c: Update test.
* gcc.target/arm/ivopts-5.c: Same.
diff -u gcc/testsuite/gcc.target/arm/ivopts-3.c (revision 0) gcc/testsuite/gcc.target/arm/ivopts-3.c (revision 0)
--- gcc/testsuite/gcc.target/arm/ivopts-3.c (revision 0)
+++ gcc/testsuite/gcc.target/arm/ivopts-3.c (revision 0)
@@ -8,14 +8,8 @@
{
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 -u gcc/testsuite/gcc.target/arm/ivopts-5.c (revision 0) gcc/testsuite/gcc.target/arm/ivopts-5.c (revision 0)
--- gcc/testsuite/gcc.target/arm/ivopts-5.c (revision 0)
+++ gcc/testsuite/gcc.target/arm/ivopts-5.c (revision 0)
@@ -8,14 +8,8 @@
{
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;
}