Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/sse2-cvtdq2ps-1.c

raw
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 } */
5
6 #ifndef CHECK_H
7 #define CHECK_H "sse2-check.h"
8 #endif
9
10 #include CHECK_H
11
12 #ifndef TEST
13 #define TEST sse2_test_cvtepi32_ps
14 #endif
15
16 #include <emmintrin.h>
17
18 static __m128
19 __attribute__((noinline, unused))
20 test (__m128i p)
21 {
22 return _mm_cvtepi32_ps (p);
23 }
24
25 static void
26 TEST (void)
27 {
28 union128 u;
29 union128i_d s;
30 float e[4];
31
32 s.x = _mm_set_epi32 (123, 321, 456, 987);
33
34 u.x = test (s.x);
35
36 e[0] = (float)s.a[0];
37 e[1] = (float)s.a[1];
38 e[2] = (float)s.a[2];
39 e[3] = (float)s.a[3];
40
41 if (check_union128 (u, e))
42 abort ();
43 }