1  /* Test case to check if AVX intrinsics and function specific target
       2     optimizations work together.  Check by including immintrin.h  */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-options "-O2 -msse -mno-avx" } */
       6  
       7  #include <immintrin.h>
       8  
       9  __m256 a[10], b[10], c[10];
      10  void __attribute__((target ("avx")))
      11  foo (void)
      12  {
      13    a[0] = _mm256_and_ps (b[0], c[0]);
      14  }
      15  
      16  /* Try again with a combination of target and optimization attributes.  */
      17  void __attribute__((target ("avx"), optimize(3)))
      18  bar (void)
      19  {
      20    a[0] = _mm256_and_ps (b[0], c[0]);
      21  }