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-8a.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 26
7
 
8
__attribute__ ((noinline)) int main1 (short X)
9
{
10
  signed char a[N];
11
  short b[N];
12
  int c[N];
13
  short myX = X;
14
  int i;
15
 
16
  /* vectorization of induction with type conversions.  */
17
  for (i = 0; i < N; i++)
18
  {
19
    a[i] = (signed char)X;
20
    b[i] = X;
21
    c[i] = (int)X;
22
    X++;
23
  }
24
 
25
  /* check results:  */
26
  for (i = 0; i < N; i++)
27
    {
28
      if (a[i] != (signed char)myX || b[i] != myX || c[i] != (int)myX++)
29
        abort ();
30
    }
31
 
32
  return 0;
33
}
34
 
35
int main (void)
36
{
37
  check_vect ();
38
 
39
  return main1 (3);
40
}
41
 
42
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_trunc && vect_unpack } } } } */
43
/* { 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.