| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O3 -mvsx" } */ |
| 3 |
/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */ |
| 4 |
/* { dg-require-effective-target p8vector_hw } */ |
| 5 |
|
| 6 |
#define NO_WARN_X86_INTRINSICS 1 |
| 7 |
|
| 8 |
#ifndef CHECK_H |
| 9 |
#define CHECK_H "sse-check.h" |
| 10 |
#endif |
| 11 |
|
| 12 |
#include CHECK_H |
| 13 |
|
| 14 |
#ifndef TEST |
| 15 |
#define TEST sse_test_movhps_2 |
| 16 |
#endif |
| 17 |
|
| 18 |
#include <xmmintrin.h> |
| 19 |
|
| 20 |
static void |
| 21 |
__attribute__((noinline, unused)) |
| 22 |
test (__m64 *p, __m128 a) |
| 23 |
{ |
| 24 |
__asm("" : "+v"(a)); |
| 25 |
return _mm_storeh_pi (p, a); |
| 26 |
} |
| 27 |
|
| 28 |
static void |
| 29 |
TEST (void) |
| 30 |
{ |
| 31 |
union128 s1; |
| 32 |
float e[2]; |
| 33 |
float d[2]; |
| 34 |
|
| 35 |
s1.x = _mm_set_ps (5.13, 6.12, 7.11, 8.9); |
| 36 |
|
| 37 |
test ((__m64 *)d, s1.x); |
| 38 |
|
| 39 |
e[0] = s1.a[2]; |
| 40 |
e[1] = s1.a[3]; |
| 41 |
|
| 42 |
if (checkVf (d, e, 2)) |
| 43 |
abort (); |
| 44 |
} |