OSDN Git Service

PR tree-optimization/51799
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-28.c
1 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
2 /* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -fdump-tree-optimized -fdump-tree-aprefetch --param max-unrolled-insns=1000" } */
3
4 char x[100000];
5
6 void foo(int n)
7 {
8   int i;
9
10   for (i = 0; i < n; i++)
11     x[i] = (char) i;
12 }
13
14 /* There should be 64 MEMs in the unrolled loop and one more in the copy of the loop
15    for the rest of the iterations.  */
16
17 /* { dg-final { scan-tree-dump-times "MEM" 65 "optimized" } } */
18
19 /* There should be no i_a = i_b assignments.  */
20 /* { dg-final { scan-tree-dump-times "i_.*= i_\[0-9\]*;" 0 "aprefetch" } } */
21
22 /* { dg-final { cleanup-tree-dump "optimized" } } */
23 /* { dg-final { cleanup-tree-dump "aprefetch" } } */