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