blob: 784caef3270299abf753fe51f0cb0a28e769c7bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* { dg-do compile } */
/* { dg-options "-O1 -fscalar-evolutions -fdump-tree-scev-details -fall-data-deps -fdump-tree-ddall" } */
void bar (short);
#define N 100
#define NPad 10
#define M 32
void foo()
{
short coef[M];
short input[N];
short output[N];
int i,j,k;
int sum;
for (i = 0; i < N; i++) {
sum = 0;
for (j = 0; j < M; j++) {
sum += input[i+NPad-j] * coef[j];
}
output[i] = sum;
}
bar (sum);
}
/* The following evolution functions have to be detected:
i -> {0, +, 1}_1
j -> {0, +, 1}_2
*/
/* { dg-final { diff-tree-dumps "ddall" } } */
|