aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/scev-15.c
blob: a0d2e595e982f4718a2e2a4ca76ae8a21e7fb6ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-ldist" } */

void
foo (int *p)
{
  unsigned short i, j;

  for (i = 0; i < 100; i++)
    for (j = 1; j < 101; j++)
      {
	unsigned int index = 100 * i + j;
	p[index-1] = 0;
      }
}

/* Loop can be transformed into builtin memset since &p[...] is SCEV.  */
/* { dg-final { scan-tree-dump "builtin_memset" "ldist" } } */