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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [wrapv-vect-7.c] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

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