2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / intrinsics_4.c
blobe7c074b31cb3076bc21fbd97b333d0a97c0f0074
1 /* Test case to check if AVX intrinsics and function specific target
2 optimizations work together. Check by including immintrin.h */
4 /* { dg-do compile } */
5 /* { dg-options "-O2 -msse -mno-avx" } */
7 #include <immintrin.h>
9 __m256 a[10], b[10], c[10];
10 void __attribute__((target ("avx")))
11 foo (void)
13 a[0] = _mm256_and_ps (b[0], c[0]);
16 /* Try again with a combination of target and optimization attributes. */
17 void __attribute__((target ("avx"), optimize(3)))
18 bar (void)
20 a[0] = _mm256_and_ps (b[0], c[0]);