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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [prefetch-3.c] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

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