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-101.c] - Blame information for rev 689

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,0};
17
 
18
__attribute__ ((noinline))
19
int main1 (int x, int y) {
20
  int i;
21
  struct extraction *p;
22
  p = (struct extraction *) malloc (sizeof (struct extraction));
23
 
24
  /* Not vectorizable: different unknown offset.  */
25
  for (i = 0; i < N; i++)
26
    {
27
      *((int *)p + x + i) = a[i];
28
      *((int *)p + y + i) = b[i];
29
    }
30
 
31
  /* check results: */
32
  for (i = 0; i < N; i++)
33
    {
34
       if (p->a[i] != a[i] || p->b[i] != b[i])
35
         abort();
36
    }
37
  return 0;
38
}
39
 
40
int main (void)
41
{
42
  check_vect ();
43
 
44
  return main1 (0, N);
45
}
46
 
47
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
48
/* { dg-final { scan-tree-dump-times "can't determine dependence" 1 "vect" { xfail vect_multiple_sizes } } } */
49
/* { dg-final { scan-tree-dump-times "can't determine dependence" 2 "vect" { target vect_multiple_sizes } } } */
50
/* { dg-final { cleanup-tree-dump "vect" } } */
51
 

powered by: WebSVN 2.1.0

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