PR target/83368
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr78037.c
blobd2e66ced7bcab454f923cc74d980679047fff85d
1 /* { dg-do run } */
2 /* { dg-require-effective-target bmi } */
3 /* { dg-options "-O2 -mbmi" } */
5 #include <x86intrin.h>
7 #include "bmi-check.h"
9 int
10 __attribute__((noinline, noclone))
11 foo (int x)
13 return __tzcnt_u32 (x) & 0x1f;
16 static void
17 bmi_test ()
19 if (foo (0) != 0)
20 abort ();