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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-12.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 16
7
 
8
int main1 ()
9
{
10
  int i;
11
  int ia[N];
12
  int ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
13
  int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
14
  short sa[N];
15
  short sc[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
16
  short sb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
17
 
18
  /* Not vectorizable yet (multiple types with different nunits in vector).  */
19
  for (i = 0; i < N; i++)
20
    {
21
      ia[i] = ib[i] + ic[i];
22
      sa[i] = sb[i] + sc[i];
23
    }
24
 
25
  /* check results:  */
26
  for (i = 0; i < N; i++)
27
    {
28
      if (ia[i] != ib[i] + ic[i] || sa[i] != sb[i] + sc[i])
29
        abort ();
30
    }
31
 
32
  return 0;
33
}
34
 
35
int main (void)
36
{
37
  check_vect ();
38
 
39
  return main1 ();
40
}
41
 
42
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
43
/* { 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.