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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-25.c] - Blame information for rev 823

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

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