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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-vfa-vect-102a.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdlib.h>
4
#include <stdarg.h>
5
#include "tree-vect.h"
6
 
7
#define N 9
8
 
9
struct extraction
10
{
11
  int a[N];
12
  int b[N];
13
};
14
 
15
static int a[N] = {1,2,3,4,5,6,7,8,9};
16
static int b[N] = {2,3,4,5,6,7,8,9,9};
17
volatile int foo;
18
 
19
__attribute__ ((noinline))
20
int main1 (int x, int y) {
21
  int i;
22
  struct extraction *p;
23
  p = (struct extraction *) malloc (sizeof (struct extraction));
24
 
25
  for (i = 0; i < N; i++)
26
    {
27
       p->a[i] = a[i];
28
       if (foo == 135)
29
         abort (); /* to avoid vectorization  */
30
    }
31
 
32
  /* Not vectorizable: distance 1.  */
33
  for (i = 0; i < N - 1; i++)
34
    {
35
       p->a[x + i + 1] = p->a[x + i];
36
    }
37
 
38
  /* check results: */
39
  for (i = 0; i < N; i++)
40
    {
41
       if (p->a[i] != 1)
42
         abort();
43
    }
44
  return 0;
45
}
46
 
47
int main (void)
48
{
49
  check_vect ();
50
 
51
  foo = 0;
52
  return main1 (0, N);
53
}
54
 
55
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
56
/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 1 "vect" { xfail vect_multiple_sizes } } } */
57
/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 2 "vect" { target vect_multiple_sizes } } } */
58
/* { dg-final { cleanup-tree-dump "vect" } } */
59
 

powered by: WebSVN 2.1.0

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