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

Subversion Repositories openrisc

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

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

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

powered by: WebSVN 2.1.0

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