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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [slp-8.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 <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 32
7
 
8
int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
9
 
10
int main1 ()
11
{
12
  int i;
13
  float fa[N];
14
 
15
  /* int -> float */
16
  for (i = 0; i < N/4; i++)
17
    {
18
      fa[4*i] = (float) ib[4*i];
19
      fa[4*i + 1] = (float) ib[4*i + 1];
20
      fa[4*i + 2] = (float) ib[4*i + 2];
21
      fa[4*i + 3] = (float) ib[4*i + 3];
22
    }
23
 
24
  /* check results:  */
25
  for (i = 0; i < N/4; i++)
26
    {
27
      if (fa[4*i] != (float) ib[4*i]
28
          || fa[4*i + 1] != (float) ib[4*i + 1]
29
          || fa[4*i + 2] != (float) ib[4*i + 2]
30
          || fa[4*i + 3] != (float) ib[4*i + 3])
31
        abort ();
32
    }
33
 
34
  return 0;
35
}
36
 
37
int main (void)
38
{
39
  check_vect ();
40
 
41
  return main1 ();
42
}
43
 
44
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target powerpc*-*-* i?86-*-* x86_64-*-* } } } */
45
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target powerpc*-*-* i?86-*-* x86_64-*-* } } } */
46
/* { 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.