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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [bb-slp-27.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 A 3
7
#define N 16
8
 
9
short src[N], dst[N];
10
 
11
void foo (int a)
12
{
13
  dst[0] += a*src[0];
14
  dst[1] += a*src[1];
15
  dst[2] += a*src[2];
16
  dst[3] += a*src[3];
17
  dst[4] += a*src[4];
18
  dst[5] += a*src[5];
19
  dst[6] += a*src[6];
20
  dst[7] += a*src[7];
21
}
22
 
23
 
24
int main (void)
25
{
26
  int i;
27
 
28
  check_vect ();
29
 
30
  for (i = 0; i < N; i++)
31
    {
32
      dst[i] = 0;
33
      src[i] = i;
34
    }
35
 
36
  foo (A);
37
 
38
  for (i = 0; i < 8; i++)
39
    {
40
      if (dst[i] != A * i)
41
        abort ();
42
    }
43
 
44
  return 0;
45
}
46
 
47
/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_int_mult && { vect_unpack && vect_pack_trunc } } } } } */
48
/* { dg-final { cleanup-tree-dump "slp" } } */
49
 

powered by: WebSVN 2.1.0

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