1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-ldist" } */
3 
4 void
foo(int * p)5 foo (int *p)
6 {
7   unsigned short i, j;
8 
9   for (i = 0; i < 100; i++)
10     for (j = 1; j < 101; j++)
11       {
12 	unsigned int index = 100 * i + j;
13 	p[index-1] = 0;
14       }
15 }
16 
17 /* Loop can be transformed into builtin memset since &p[...] is SCEV.  */
18 /* { dg-final { scan-tree-dump "builtin_memset" "ldist" } } */
19