1/* Test case to check if intrinsics and function specific target
2   optimizations work together.  Check if the POPCNT specific intrinsics
3   in included with popcntintrin.h get enabled by directly including
4   popcntintrin.h  */
5
6/* { dg-do compile } */
7/* { dg-options "-O2 -msse -mno-sse4.1 -mno-sse4.2 -mno-popcnt -std=gnu89" } */
8
9#include <popcntintrin.h>
10
11__attribute__((target("popcnt")))
12long long foo(unsigned long long X)
13{
14    return _mm_popcnt_u64 (X);
15}
16