aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/bmi-3.c
blob: 0b91bc25bf8eeb367f0d30b0ebaf55a41184df23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-O2 -mbmi " } */
/* { dg-final { scan-assembler-times "tzcntw\[^\\n]*%?ax" 2 } } */

#include <x86intrin.h>

unsigned short
func_tzcnt16 (unsigned short X)
{
  return __tzcnt_u16(X);
}

unsigned short
func_tzcnt16_2 (unsigned short X)
{
  return _tzcnt_u16(X);
}