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/] [slp-multitypes-12.c] - Blame information for rev 298

Go to most recent revision | 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 128 
8
 
9
__attribute__ ((noinline)) int
10
main1 ()
11
{
12
  int i;
13
  unsigned short sout[N*8];
14
  unsigned int iout[N*8];
15
  unsigned char cout[N*8];
16
 
17
  for (i = 0; i < N; i++)
18
    {
19
      sout[i*4] = 8;
20
      sout[i*4 + 1] = 18;
21
      sout[i*4 + 2] = 28;
22
      sout[i*4 + 3] = 38;
23
 
24
      iout[i*4] = 8;
25
      iout[i*4 + 1] = 18;
26
      iout[i*4 + 2] = 28;
27
      iout[i*4 + 3] = 38;
28
 
29
      cout[i*4] = 1;
30
      cout[i*4 + 1] = 2;
31
      cout[i*4 + 2] = 3;
32
      cout[i*4 + 3] = 4;
33
    }
34
 
35
  /* check results:  */
36
  for (i = 0; i < N; i++)
37
    {
38
      if (sout[i*4] != 8
39
         || sout[i*4 + 1] != 18
40
         || sout[i*4 + 2] != 28
41
         || sout[i*4 + 3] != 38
42
         || iout[i*4] != 8
43
         || iout[i*4 + 1] != 18
44
         || iout[i*4 + 2] != 28
45
         || iout[i*4 + 3] != 38
46
         || cout[i*4] != 1
47
         || cout[i*4 + 1] != 2
48
         || cout[i*4 + 2] != 3
49
         || cout[i*4 + 3] != 4)
50
        abort ();
51
    }
52
 
53
  return 0;
54
}
55
 
56
int main (void)
57
{
58
  check_vect ();
59
 
60
  main1 ();
61
 
62
  return 0;
63
}
64
 
65
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
66
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect"  } } */
67
/* { dg-final { cleanup-tree-dump "vect" } } */
68
 

powered by: WebSVN 2.1.0

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