PR rtl-optimization/87918
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx-cvtsd-1.c
blobe70184c654d80501487f34f190f72953875bbf11
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 (__m256d x)
10 return _mm256_cvtsd_f64 (x);
13 static void
14 avx_test (void)
16 if (_mm256_cvtsd_f64 (_mm256_set_pd (13.5, 24.5, 23.0, 22.5)) != 22.5)
17 __builtin_abort ();
19 if (foo (_mm256_set_pd (24.25, 23.75, 22.0, 12.25)) != 12.25)
20 __builtin_abort ();