| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim2-details" } */ |
| 3 |
|
| 4 |
static inline __attribute__((always_inline)) |
| 5 |
void f(int * __restrict__ r, |
| 6 |
int a[__restrict__ 16][16], |
| 7 |
int b[__restrict__ 16][16], |
| 8 |
int i, int j) |
| 9 |
{ |
| 10 |
int x; |
| 11 |
*r = 0; |
| 12 |
for (x = 1; x < 16; ++x) |
| 13 |
*r = *r + a[i][x] * b[x][j]; |
| 14 |
} |
| 15 |
|
| 16 |
void g(int *r, int a[16][16], int b[16][16], int i, int j) |
| 17 |
{ |
| 18 |
f (r, a, b, i ,j); |
| 19 |
} |
| 20 |
|
| 21 |
/* We should apply store motion to the store to *r. */ |
| 22 |
|
| 23 |
/* { dg-final { scan-tree-dump "Executing store motion of \\\*r" "lim2" } } */ |