Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx-cvtss-1.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O2 -mavx" } */
4
5 #include "avx-check.h"
6
7 __attribute__((noinline, noclone)) double
8 foo (__m256 x)
9 {
10 return _mm256_cvtss_f32 (x);
11 }
12
13 static void
14 avx_test (void)
15 {
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 ();
19
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 ();
23 }