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/] [vect/] [costmodel/] [ppc/] [costmodel-vect-31b.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "../../tree-vect.h"
5
 
6
#define N 32
7
 
8
struct t{
9
  int k[N];
10
  int l;
11
};
12
 
13
struct s{
14
  char a;       /* aligned */
15
  char b[N-1];  /* unaligned (offset 1B) */
16
  char c[N];    /* aligned (offset NB) */
17
  struct t d;   /* aligned (offset 2NB) */
18
  struct t e;   /* unaligned (offset 2N+4N+4 B) */
19
};
20
 
21
int main1 ()
22
{
23
  int i;
24
  struct s tmp;
25
 
26
  /* aligned */
27
  for (i = 0; i < N/2; i++)
28
    {
29
      tmp.c[i] = 6;
30
    }
31
 
32
  /* check results:  */
33
  for (i = 0; i <N/2; i++)
34
    {
35
      if (tmp.c[i] != 6)
36
        abort ();
37
    }
38
 
39
  return 0;
40
}
41
 
42
int main (void)
43
{
44
  check_vect ();
45
 
46
  return main1 ();
47
}
48
 
49
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
50
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

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