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

Subversion Repositories openrisc_me

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

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

Line No. Rev Author Line
1 298 jeremybenn
/* Inspired from sbitmap_a_or_b_and_c_cg function in sbitmap.c.  */
2
/* { dg-do run } */
3
/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
4
 
5
extern void abort (void);
6
 
7
int a[5] = { 0, 1, 0, 0, 0 };
8
int b[5] = { 0, 1, 0, 1, 0 };
9
int c[5] = { 0, 0, 1, 1, 0 };
10
int dst[5] = { 0, 0, 0, 0, 0 };
11
 
12
__attribute__ ((noinline))
13
void
14
foo (int size, int *ap, int *bp, int *cp, int *dstp)
15
{
16
  unsigned int i, n = size;
17
  int changed = 0;
18
 
19
  for (i = 0; i < n; i++)
20
    {
21
      const int tmp = *ap++ | (*bp++ & *cp++);
22
      changed |= *dstp ^ tmp;
23
      *dstp++ = tmp;
24
    }
25
 
26
  if (changed == 0)
27
    abort ();
28
}
29
 
30
int
31
main ()
32
{
33
  foo (5, a, b, c, dst);
34
  return 0;
35
}
36
 
37
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
38
/* { dg-final { cleanup-rtl-dump "sms" } } */
39
 

powered by: WebSVN 2.1.0

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