PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx-cvtss-1.c
blob3e5b74ea3f7dad850a6d9a50127d63c420c1f030
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O2 -mavx" } */
5 #include "avx-check.h"
7 __attribute__((noinline, noclone)) double
8 foo (__m256 x)
10 return _mm256_cvtss_f32 (x);
13 static void
14 avx_test (void)
16 if (_mm256_cvtss_f32 (_mm256_set_ps (5.5f, 24.5f, 23.0f, 22.5f,
17 2.0f, 3.0f, 4.0f, 13.5f)) != 13.5f)
18 __builtin_abort ();
20 if (foo (_mm256_set_ps (5.25f, 24.25f, 23.75f, 22.0f,
21 2.0f, 3.0f, 4.0f, 12.25f)) != 12.25f)
22 __builtin_abort ();