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 foo(__m256d x)8foo (__m256d x) 9 { 10 return _mm256_cvtsd_f64 (x); 11 } 12 13 static void avx_test(void)14avx_test (void) 15 { 16 if (_mm256_cvtsd_f64 (_mm256_set_pd (13.5, 24.5, 23.0, 22.5)) != 22.5) 17 __builtin_abort (); 18 19 if (foo (_mm256_set_pd (24.25, 23.75, 22.0, 12.25)) != 12.25) 20 __builtin_abort (); 21 } 22