aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/intrinsics_4.c
blob: e7c074b31cb3076bc21fbd97b333d0a97c0f0074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Test case to check if AVX intrinsics and function specific target
   optimizations work together.  Check by including immintrin.h  */

/* { dg-do compile } */
/* { dg-options "-O2 -msse -mno-avx" } */

#include <immintrin.h>

__m256 a[10], b[10], c[10];
void __attribute__((target ("avx")))
foo (void)
{
  a[0] = _mm256_and_ps (b[0], c[0]);
}

/* Try again with a combination of target and optimization attributes.  */
void __attribute__((target ("avx"), optimize(3)))
bar (void)
{
  a[0] = _mm256_and_ps (b[0], c[0]);
}