aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/unroll-10.c
blob: 0559915f2fc91a4dbeb2d71837a6c5c1123c1497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-options "-O3 -fdump-tree-unrolljam" } */

void
f (int *restrict x, int *restrict y, int z[restrict 100][100])
{
  for (int j = 0; j < 100; ++j)
    for (int i = 0; i < 100; ++i)
      x[i] += y[i] * z[j][i];
}

/* The loop should be unrolled 2 times, leaving one load from x,
   one load from y and 2 loads from z.  */
/* { dg-final { scan-tree-dump-times { = \(*\*} 4 "unrolljam" } } */