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/] [vect-multitypes-11.c] - Blame information for rev 338

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 64
7
 
8
short x[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
9
 
10
__attribute__ ((noinline)) int
11
foo (int len, int *z) {
12
  int i;
13
 
14
  for (i=0; i<len; i++) {
15
    z[i] = x[i];
16
  }
17
}
18
 
19
 
20
int main (void)
21
{
22
  short i;
23
  int z[N+4];
24
 
25
  check_vect ();
26
 
27
  for (i=0; i<N; i++) {
28
    x[i] = i;
29
  }
30
 
31
  foo (N,z+2);
32
 
33
  for (i=0; i<N; i++) {
34
    if (z[i+2] != x[i])
35
      abort ();
36
  }
37
 
38
  return 0;
39
}
40
 
41
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
42
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_unpack } } } } */
43
/* { dg-final { cleanup-tree-dump "vect" } } */
44
 

powered by: WebSVN 2.1.0

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