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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [sms-6.c] - Blame information for rev 774

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

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

powered by: WebSVN 2.1.0

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