OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-strided-store-u32-i2.c] - Blame information for rev 384

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 <stdio.h>
5
#include "tree-vect.h"
6
 
7
#define N 16
8
 
9
int a[N*2];
10
int b[N] = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30};
11
int c[N] = {1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31};
12
 
13
__attribute__ ((noinline)) int
14
main1 (void)
15
{
16
  int i;
17
 
18
  /* Strided access pattern.  */
19
  for (i = 0; i < N/2; i++)
20
    {
21
      a[i*2] = b[i] + c[i];
22
      a[i*2+1] = b[i] * c[i];
23
    }
24
 
25
  /* Check results.  */
26
  for (i = 0; i < N/2; i++)
27
    {
28
      if (a[i*2] != b[i] + c[i]
29
          || a[i*2+1] != b[i] * c[i])
30
        abort();
31
    }
32
 
33
  return 0;
34
}
35
 
36
int main (void)
37
{
38
  check_vect ();
39
  return main1 ();
40
}
41
 
42
/* Needs interleaving support.  */
43
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave } } } } */
44
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail { vect_interleave } } } } */
45
/* { dg-final { cleanup-tree-dump "vect" } } */
46
 

powered by: WebSVN 2.1.0

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