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