Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / vcvtps2ph-2.c
blob57436ae86bf80e2f0c639c82d8f4097375a02fa2
1 /* { dg-do run } */
2 /* { dg-require-effective-target f16c } */
3 /* { dg-options "-O2 -mf16c" } */
5 #include "f16c-check.h"
7 static void
8 f16c_test (void)
10 union256 val;
11 union128i_w res;
12 short exp[8];
14 val.a[0] = 1;
15 val.a[1] = 2;
16 val.a[2] = 4;
17 val.a[3] = 8;
18 val.a[4] = -1;
19 val.a[5] = -2;
20 val.a[6] = -4;
21 val.a[7] = -8;
23 exp[0] = 0x3c00;
24 exp[1] = 0x4000;
25 exp[2] = 0x4400;
26 exp[3] = 0x4800;
27 exp[4] = 0xbc00;
28 exp[5] = 0xc000;
29 exp[6] = 0xc400;
30 exp[7] = 0xc800;
32 res.x = _mm256_cvtps_ph (val.x, 0);
34 if (check_union128i_w (res, exp))
35 abort ();