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-cond-1.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_condition } */
2
 
3
#include "tree-vect.h"
4
 
5
#define N 128
6
 
7
__attribute__((noinline, noclone)) void
8
foo (int *a, int stride)
9
{
10
  int i;
11
 
12
  for (i = 0; i < N/stride; i++, a += stride)
13
   {
14
     a[0] = a[0] ? 1 : 5;
15
     a[1] = a[1] ? 2 : 6;
16
     a[2] = a[2] ? 3 : 7;
17
     a[3] = a[3] ? 4 : 8;
18
   }
19
}
20
 
21
 
22
int a[N];
23
int main ()
24
{
25
  int i;
26
 
27
  check_vect ();
28
 
29
  for (i = 0; i < N; i++)
30
    a[i] = i;
31
 
32
  foo (a, 4);
33
 
34
  for (i = 1; i < N; i++)
35
    if (a[i] != i%4 + 1)
36
      abort ();
37
 
38
  if (a[0] != 5)
39
    abort ();
40
 
41
  return 0;
42
}
43
 
44
/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
45
/* { dg-final { cleanup-tree-dump "slp" } } */
46
 

powered by: WebSVN 2.1.0

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