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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [wrapv-vect-7.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 128
7
 
8
short sa[N];
9
short sb[N];
10
 
11
int main1 ()
12
{
13
  int i;
14
 
15
  for (i = 0; i < N; i++)
16
    {
17
      sb[i] = 5;
18
    }
19
 
20
  /* check results:  */
21
  for (i = 0; i < N; i++)
22
    {
23
      if (sb[i] != 5)
24
        abort ();
25
    }
26
 
27
  for (i = 0; i < N; i++)
28
    {
29
      sa[i] = sb[i] + (short)100;
30
    }
31
 
32
  /* check results:  */
33
  for (i = 0; i < N; i++)
34
    {
35
      if (sa[i] != 105)
36
        abort ();
37
    }
38
 
39
  return 0;
40
}
41
 
42
int main (void)
43
{
44
  check_vect ();
45
 
46
  return main1 ();
47
}
48
 
49
/* Fails for 32-bit targets that don't vectorize PLUS.  */
50
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
51
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
52
/* { 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.