1 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-require-effective-target sse2 } */
4 /* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=athlon" } } */
5 /* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
14 /* Nontemporal store should not be used here (only write and read temporal
16 for (i
= 0; i
< K
- 10000; i
++)
19 /* Nontemporal store should not be used here (only write and read nontemporal
21 for (i
= 0; i
< K
- 100000; i
++)
24 /* Nontemporal store should be used neither for a nor for p, as we do not know
25 whether they alias or not. */
26 for (i
= 0; i
< K
; i
++)
32 /* Nontemporal store should not be used for a, as we do not know whether its
33 value will be reused or not. */
34 for (i
= 0; i
< 1000; i
++)
38 /* { dg-final { scan-tree-dump-times "Issued prefetch" 5 "aprefetch" } } */
39 /* { dg-final { scan-tree-dump-times "Issued nontemporal prefetch" 2 "aprefetch" } } */
40 /* { dg-final { scan-tree-dump-times "a nontemporal store" 0 "aprefetch" } } */
42 /* { dg-final { scan-tree-dump-times "builtin_prefetch" 7 "optimized" } } */
44 /* { dg-final { scan-assembler-times "prefetchw" 5 } } */
45 /* { dg-final { scan-assembler-times "prefetcht" 1 } } */
46 /* { dg-final { scan-assembler-times "prefetchnta" 1 } } */
48 /* { dg-final { cleanup-tree-dump "aprefetch" } } */
49 /* { dg-final { cleanup-tree-dump "optimized" } } */