OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-11a.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target vect_int } */
2
/* { dg-require-effective-target vect_int_mult } */
3
 
4
#include <stdarg.h>
5
#include "tree-vect.h"
6
 
7
extern void abort (void);
8
 
9
unsigned int A[8] = {0x08000000,0xffffffff,0xff0000ff,0xf0000001,
10
                     0x08000000,0xffffffff,0xff0000ff,0xf0000001};
11
unsigned int B[8] = {0x08000000,0x08000001,0xff0000ff,0xf0000001,
12
                     0x08000000,0x08000001,0xff0000ff,0xf0000001};
13
unsigned int Answer[8] = {0,0xf7ffffff,0x0200fe01,0xe0000001,
14
                          0,0xf7ffffff,0x0200fe01,0xe0000001};
15
unsigned int C[8];
16
 
17
__attribute__ ((noinline))
18
void u ()
19
{
20
  int i, j;
21
 
22
  for (i=0; i<8; i++)
23
    C[i] = A[i] * B[i];
24
  for (i=0; i<8; i++)
25
    if (C[i] != Answer[i])
26
      abort ();
27
}
28
 
29
signed int D[8] = {0x08000000,0xffffffff,0xff0000ff,0xf0000001,
30
                   0x08000000,0xffffffff,0xff0000ff,0xf0000001};
31
signed int E[8] = {0x08000000,0x08000001,0xff0000ff,0xf0000001,
32
                   0x08000000,0x08000001,0xff0000ff,0xf0000001};
33
signed int Dnswer[8] = {0,0xf7ffffff,0x0200fe01, 0xe0000001,
34
                        0,0xf7ffffff,0x0200fe01, 0xe0000001};
35
signed int F[8];
36
 
37
__attribute__ ((noinline))
38
void s()
39
{
40
  int i, j;
41
 
42
  for (i=0; i<8; i++)
43
    F[i] = D[i] * E[i];
44
  for (i=0; i<8; i++)
45
    if (F[i] != Dnswer[i])
46
      abort ();
47
}
48
 
49
__attribute__ ((noinline))
50
int main1 ()
51
{
52
  u();
53
  s();
54
  return 0;
55
}
56
 
57
int main (void)
58
{
59
  check_vect ();
60
 
61
  return main1 ();
62
}
63
 
64
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
65
/* { 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.