111
|
1 /* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
|
|
2 /* { dg-options "-O2 -fprefetch-loop-arrays -march=amdfam10 --param simultaneous-prefetches=100 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
|
|
3
|
|
4 #define K 1000000
|
|
5 int a[K], b[K];
|
|
6
|
|
7 void test()
|
|
8 {
|
|
9 unsigned i;
|
|
10
|
|
11 /* Nontemporal store should be used for a, nontemporal prefetch for b. */
|
|
12 for (i = 0; i < K; i++)
|
|
13 a[i] = b[i];
|
|
14
|
|
15 }
|
|
16
|
|
17 /* { dg-final { scan-tree-dump-times "Issued nontemporal prefetch" 1 "aprefetch" } } */
|
|
18 /* { dg-final { scan-tree-dump-times "a nontemporal store" 1 "aprefetch" } } */
|
|
19
|
|
20 /* { dg-final { scan-tree-dump-times "builtin_prefetch" 1 "optimized" } } */
|
|
21 /* { dg-final { scan-tree-dump "=\\{nt\\}" "optimized" } } */
|
|
22 /* { dg-final { scan-tree-dump-times "__builtin_ia32_mfence" 1 "optimized" } } */
|