Handle T_HRESULT types in CodeView records
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / sse2-cvtsd2ss-1.c
blobaedf55a997f85b0eebcd2733df488b942e823840
1 /* { dg-do run } */
2 /* { dg-options "-O3 -mvsx -Wno-psabi" } */
3 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
4 /* { dg-require-effective-target p8vector_hw } */
6 #ifndef CHECK_H
7 #define CHECK_H "sse2-check.h"
8 #endif
10 #include CHECK_H
12 #ifndef TEST
13 #define TEST sse2_test_cvtsd2ss_1
14 #endif
16 #include <emmintrin.h>
18 static __m128
19 __attribute__((noinline, unused))
20 test (__m128 p1, __m128d p2)
22 return _mm_cvtsd_ss (p1, p2);
25 static void
26 TEST (void)
28 union128d s1;
29 union128 u, s2;
30 double source1[2] = {123.345, 67.3321};
31 float e[4] = {5633.098, 93.21, 3.34, 4555.2};
33 s1.x = _mm_loadu_pd (source1);
34 s2.x = _mm_loadu_ps (e);
36 __asm("" : "+v"(s1.x), "+v"(s2.x));
37 u.x = test(s2.x, s1.x);
39 e[0] = (float)source1[0];
41 if (check_union128(u, e))
43 #if DEBUG
44 printf ("sse2_test_cvtsd2ss_1; check_union128 failed\n");
45 printf ("\t [%f,%f,%f,%f],[%f,%f]\n", s2.a[0], s2.a[1], s2.a[2], s2.a[3],
46 s1.a[0], s1.a[1]);
47 printf ("\t -> \t[%f,%f,%f,%f]\n", u.a[0], u.a[1], u.a[2], u.a[3]);
48 printf ("\texpect\t[%f,%f,%f,%f]\n", e[0], e[1], e[2], e[3]);
49 #endif
50 abort ();