PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / update-unroll-1.c
blob1028c8b06f5e93caae28e2b98f7d4bb381f087d8
1 /* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
2 /* { dg-options "-O1 -fprefetch-loop-arrays -march=amdfam10 -fdump-tree-aprefetch-blocks" } */
4 int a[10000];
6 int foo(unsigned n)
8 unsigned i, s = 0;
10 for (i = 0; i < n; i++)
11 s += a[i];
13 return s;
16 /* We used to make the probability that the body of the loop (unrolled
17 to enable prefetching) is entered 0, which is not correct. */
19 /* { dg-final { scan-tree-dump-not "Invalid sum" "aprefetch"} } */
20 /* { dg-final { scan-tree-dump-not "SUCC: 7 .100.0%" "aprefetch"} } */