2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-cvtss-1.c
blob04e80ca5f301140174df121fe77fef81791b36f2
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx512f } */
3 /* { dg-options "-O2 -mavx512f" } */
5 #include "avx512f-check.h"
7 __attribute__((noinline, noclone)) double
8 foo (__m512 x)
10 return _mm512_cvtss_f32 (x);
13 static void
14 avx512f_test (void)
16 if (_mm512_cvtss_f32 (_mm512_set_ps (13.0f, 24.5f, 23.0f, 22.5f,
17 2.0f, 3.0f, 4.0f, 5.0f,
18 6.0f, 7.0f, 8.0f, 9.0f,
19 10.0f, 11.0f, 12.0f, 13.5f)) != 13.5f)
20 __builtin_abort ();
22 if (foo (_mm512_set_ps (13.25f, 24.25f, 23.75f, 22.0f,
23 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f,
24 10.0f, 11.0f, 12.0f, 12.25f)) != 12.25f)
25 __builtin_abort ();