libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / prefetch-3.c
blob46f0d0c2317760e7ae7221555002106e23ad00f1
1 /* Prefetching used to prefer nonsensical unroll factor of 5 in this testcase. */
3 /* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
4 /* { dg-options "-O2 -fno-tree-vectorize -fprefetch-loop-arrays -march=amdfam10 -fdump-tree-aprefetch-details" } */
6 #define N 1000000
8 double a[N];
10 double test(void)
12 unsigned i;
13 double sum = 0;
15 for (i = 0; i < N; i += 2)
16 sum += (a[i] * a[i+1]);
18 return sum;
21 /* { dg-final { scan-tree-dump-times "unroll factor 4" 1 "aprefetch" } } */