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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr32912-1.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
/* PR middle-end/32912 */
2
/* { dg-do run } */
3
/* { dg-options "-O2 -w" } */
4
/* { dg-options "-O2 -w -fno-common" { target hppa*-*-hpux* } } */
5
 
6
extern void abort (void);
7
 
8
typedef int __m128i __attribute__ ((__vector_size__ (16)));
9
 
10
__m128i a, b, c, d, e, f;
11
 
12
void
13
foo (__m128i x)
14
{
15
  a = x ^ ~x;
16
  b = ~x ^ x;
17
  c = x | ~x;
18
  d = ~x | x;
19
  e = x & ~x;
20
  f = ~x & x;
21
}
22
 
23
int
24
main (void)
25
{
26
  union { __m128i v; int i[sizeof (__m128i) / sizeof (int)]; } u;
27
  int i;
28
 
29
  for (i = 0; i < sizeof (u.i) / sizeof (u.i[0]); i++)
30
    u.i[i] = i * 49 - 36;
31
  foo (u.v);
32
#define check(x, val) \
33
  u.v = (x); \
34
  for (i = 0; i < sizeof (u.i) / sizeof (u.i[0]); i++) \
35
    if (u.i[i] != (val)) \
36
      abort ()
37
 
38
  check (a, ~0);
39
  check (b, ~0);
40
  check (c, ~0);
41
  check (d, ~0);
42
  check (e, 0);
43
  check (f, 0);
44
  return 0;
45
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.