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

Subversion Repositories openrisc

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

powered by: WebSVN 2.1.0

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