summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/bmi-2.c
blob: 56f73876d0c4c44eab8121c1495c30db5b52c778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* { dg-do compile { target { ! { ia32 }  } } } */
/* { dg-options "-O2 -mbmi " } */
/* { dg-final { scan-assembler "andn\[^\\n]*(%|)rax" } } */
/* { dg-final { scan-assembler "bextr\[^\\n]*(%|)rax" } } */
/* { dg-final { scan-assembler "blsi\[^\\n]*(%|)rax" } } */
/* { dg-final { scan-assembler "blsmsk\[^\\n]*(%|)rax" } } */
/* { dg-final { scan-assembler "blsr\[^\\n]*(%|)rax" } } */
/* { dg-final { scan-assembler "tzcntq\[^\\n]*(%|)rax" } } */

#include <x86intrin.h>

unsigned long long
func_andn64 (unsigned long long X, unsigned long long Y)
{
  return __andn_u64 (X, Y);
}

unsigned long long
func_bextr64 (unsigned long long X, unsigned long long Y)
{
  return __bextr_u64 (X, Y);
}

unsigned long long
func_blsi64 (unsigned long long X)
{
  return __blsi_u64 (X);
}

unsigned long long
func_blsmsk64 (unsigned long long X)
{
  return __blsmsk_u64 (X);
}

unsigned long long
func_blsr64 (unsigned long long X)
{
  return __blsr_u64 (X);
}

unsigned long long
func_tzcnt64 (unsigned long long X)
{
  return __tzcnt_u64 (X);
}