OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [prefetch-3.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Prefetching used to prefer nonsensical unroll factor of 5 in this testcase.  */
2
 
3
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
4
/* { dg-require-effective-target ilp32 } */
5
/* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse -fdump-tree-aprefetch-details" } */
6
 
7
#define N 1000000
8
 
9
double a[N];
10
 
11
double test(void)
12
{
13
  unsigned i;
14
  double sum = 0;
15
 
16
  for (i = 0; i < N; i += 2)
17
    sum += (a[i] * a[i+1]);
18
 
19
  return sum;
20
}
21
 
22
/* { dg-final { scan-tree-dump-times "unroll factor 4" 1 "aprefetch" } } */
23
/* { dg-final { cleanup-tree-dump "aprefetch" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.