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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [pr21591.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-effective-target vect_int } */
3
 
4
struct a
5
{
6
  int length;
7
  int a1[256];
8
};
9
 
10
struct a *malloc1(__SIZE_TYPE__) __attribute__((malloc));
11
void free(void*);
12
 
13
struct a *p, *q, *r;
14
 
15
void f(void)
16
{
17
   struct a *a = malloc1(sizeof(struct a));
18
   struct a *b = malloc1(sizeof(struct a));
19
   struct a *c = malloc1(sizeof(struct a));
20
   int i;
21
 
22
   for (i = 0; i < 256; i++)
23
   {
24
      b->a1[i] = i;
25
      c->a1[i] = i;
26
   }
27
   for (i = 0; i < 256; i++)
28
   {
29
      a->a1[i] = b->a1[i] + c->a1[i];
30
   }
31
   p = a;
32
   q = b;
33
   r = c;
34
}
35
 
36
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
37
/* { dg-final { cleanup-tree-dump "vect" } } */
38
 

powered by: WebSVN 2.1.0

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