aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/loop-34.c
blob: 125a2202d193c3966972bf61623191d0b7a0f7a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-lim1-details" } */

int r[6];

void f (int n)
{
  while (-- n)
    {
      r [0] += r [5];
      r [1] += r [0];
      r [2] += r [1];
      r [3] += r [2];
      r [4] += r [3];
      r [5] += r [4];
    }
}


/* { dg-final { scan-tree-dump-times "Executing store motion of r" 6 "lim1" } } */
/* { dg-final { cleanup-tree-dump "lim1" } } */