aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/intrinsics_3.c
blob: e5ea8a967ec3bf47b014ac154938e04cfdba263c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Test case to check if intrinsics and function specific target
   optimizations work together.  Check if the POPCNT specific intrinsics
   in included with popcntintrin.h get enabled by directly including
   popcntintrin.h  */

/* { dg-do compile } */
/* { dg-options "-O2 -msse -mno-sse4.1 -mno-sse4.2 -mno-popcnt" } */

#include <popcntintrin.h>

__attribute__((target("popcnt")))
long long foo(unsigned long long X)
{
    return _mm_popcnt_u64 (X);
}