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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-iv-4.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 16
7
 
8
__attribute__ ((noinline)) int main1 ()
9
{
10
  unsigned int arr1[N];
11
  unsigned short arr2[N];
12
  unsigned int k = 0;
13
  unsigned short m = 3;
14
  int i = 0;
15
 
16
  /* Vectorization of induction with multiple data types.  */
17
 
18
   do {
19
        k = k + 2;
20
        arr1[i] = k;
21
        m = k + 3;
22
        arr2[i] = m;
23
        i++;
24
   } while (i < N);
25
 
26
  /* check results:  */
27
  for (i = 0; i < N; i++)
28
    {
29
      if (arr1[i] != 2+2*i || arr2[i] != 5 + 2*i)
30
        abort ();
31
    }
32
 
33
  return 0;
34
}
35
 
36
int main (void)
37
{
38
  check_vect ();
39
 
40
  return main1 ();
41
}
42
 
43
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_pack_trunc } } } */
44
/* { 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.