blob: 8ae0518bdb60b379afd27925cf8c3a969075229a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/* { dg-do assemble } */
/* { dg-options "-mthumb -Os -fdump-tree-ivopts -save-temps" } */
extern unsigned int foo (int*) __attribute__((pure));
unsigned int
tr2 (int array[], int n)
{
unsigned int sum = 0;
int x;
if (n > 0)
for (x = 0; x < n; x++)
sum += foo (&array[x]);
return sum;
}
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <x" 0 "ivopts"} } */
/* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
/* { dg-final { object-size text <= 36 { target arm_thumb2_ok } } } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
|