OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [sms-6.c] - Blame information for rev 378

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */
3
 
4
extern void abort (void);
5
 
6
__attribute__ ((noinline))
7
void foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
8
{
9
   int i;
10
   for(i = 0; i < 100; i+=4)
11
     {
12
       a[i] = b[i] * c[i];
13
       a[i+1] = b[i+1] * c[i+1];
14
       a[i+2] = b[i+2] * c[i+2];
15
       a[i+3] = b[i+3] * c[i+3];
16
     }
17
}
18
 
19
 
20
int a[100], b[100], c[100];
21
int main()
22
{
23
#if (__SIZEOF_INT__ <= 2)
24
  int i;
25
  long res;
26
#else
27
  int i, res;
28
#endif  
29
  for(i = 0; i < 100; i++)
30
    {
31
      b[i] = c[i] = i;
32
    }
33
  foo(a, b, c);
34
 
35
  res = 0;
36
  for(i = 0; i < 100; i++)
37
    {
38
      res += a[i];
39
    }
40
  if(res != 328350)
41
    abort();
42
 
43
  return 0;
44
}
45
 
46
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms"  { target spu-*-* } } } */
47
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3  "sms" { target powerpc*-*-* } } } */
48
/* { dg-final { cleanup-rtl-dump "sms" } } */
49
 

powered by: WebSVN 2.1.0

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