1 /* { dg-do run } */ 2 /* { dg-require-effective-target avx } */ 3 /* { dg-options "-O2 -mavx" } */ 4 5 #include "avx-check.h" 6 7 #ifndef CTRL 8 #define CTRL 1 9 #endif 10 11 void static avx_test()12avx_test () 13 { 14 union128d u, src; 15 double s[2] = {9674.67456, 13543.9788}; 16 double e[2]; 17 18 src.x=_mm_loadu_pd(s); 19 u.x=_mm_permute_pd(src.x, CTRL); 20 21 e[0] = s[ (CTRL & 0x01)]; 22 e[1] = s[((CTRL & 0x02) >> 1)]; 23 24 if (check_union128d (u, e)) 25 abort (); 26 } 27 28