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/] [vect/] [vect-25.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 128
7
 
8
__attribute__ ((noinline))
9
int main1 (int n, int *p)
10
{
11
  int i;
12
  int ib[N];
13
  int ia[N];
14
  int k;
15
 
16
  for (i = 0; i < N; i++)
17
    {
18
      ia[i] = n;
19
    }
20
 
21
  /* check results:  */
22
  for (i = 0; i < N; i++)
23
    {
24
      if (ia[i] != n)
25
        abort ();
26
    }
27
 
28
  k = *p;
29
  for (i = 0; i < N; i++)
30
    {
31
      ib[i] = k;
32
    }
33
 
34
  /* check results:  */
35
  for (i = 0; i < N; i++)
36
    {
37
      if (ib[i] != k)
38
        abort ();
39
    }
40
 
41
  return 0;
42
}
43
 
44
int main (void)
45
{
46
  int m = 8;
47
 
48
  check_vect ();
49
 
50
  return main1 (m, &m);
51
}
52
 
53
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
54
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
55
/* { 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.