summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/bmi-1.c
blob: dc964ba3d9234e81779ec578747c9183c4fb5e26 (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 } */
/* { dg-options "-O2 -mbmi " } */
/* { dg-final { scan-assembler "andn\[^\\n]*(%|)eax" } } */
/* { dg-final { scan-assembler "bextr\[^\\n]*(%|)eax" } } */
/* { dg-final { scan-assembler "blsi\[^\\n]*(%|)eax" } } */
/* { dg-final { scan-assembler "blsmsk\[^\\n]*(%|)eax" } } */
/* { dg-final { scan-assembler "blsr\[^\\n]*(%|)eax" } } */
/* { dg-final { scan-assembler "tzcntl\[^\\n]*(%|)eax" } } */

#include <x86intrin.h>

unsigned int
func_andn32 (unsigned int X, unsigned int Y)
{
  return __andn_u32(X, Y);
}

unsigned int
func_bextr32 (unsigned int X, unsigned int Y)
{
  return __bextr_u32(X, Y);
}

unsigned int
func_blsi32 (unsigned int X)
{
  return __blsi_u32(X);
}

unsigned int
func_blsmsk32 (unsigned int X)
{
  return __blsmsk_u32(X);
}

unsigned int
func_blsr32 (unsigned int X)
{
  return __blsr_u32(X);
}

unsigned int
func_tzcnt32 (unsigned int X)
{
  return __tzcnt_u32(X);
}