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