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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [pr49133.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2
/* { dg-options "-O2 -msse2" } */
3
/* { dg-require-effective-target sse2_runtime } */
4
 
5
#include 
6
 
7
extern "C" void abort ();
8
 
9
typedef double double_a __attribute__((__may_alias__));
10
 
11
struct V
12
{
13
  __m128d data;
14
};
15
 
16
int
17
main()
18
{
19
  V a;
20
  __m128d b;
21
 
22
  b = _mm_set_pd (1., 0.);
23
  a.data = _mm_set_pd (1., 0.);
24
  a.data = _mm_add_pd (a.data,
25
                       _mm_and_pd (_mm_cmpeq_pd (a.data, _mm_set1_pd (0.)),
26
                                   _mm_set1_pd (2.)));
27
  reinterpret_cast(&a.data)[1] += 1.;
28
  b = _mm_add_pd (b, _mm_and_pd (_mm_cmpeq_pd (b, _mm_set1_pd (0.)),
29
                                 _mm_set1_pd (1.)));
30
  b = _mm_add_pd (b, _mm_and_pd (_mm_cmpeq_pd (b, _mm_set1_pd (1.)),
31
                                 _mm_set1_pd (1.)));
32
  if (_mm_movemask_pd (_mm_cmpeq_pd (a.data, b)) != 0x3)
33
    abort();
34
 
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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