1 /* { dg-do run } */ 2 /* { dg-require-effective-target bmi } */ 3 /* { dg-options "-O2 -mbmi" } */ 4 5 #include <x86intrin.h> 6 7 #include "bmi-check.h" 8 9 int 10 __attribute__((noinline, noclone)) foo(int x)11foo (int x) 12 { 13 return __tzcnt_u32 (x) & 0x1f; 14 } 15 16 static void bmi_test()17bmi_test () 18 { 19 if (foo (0) != 0) 20 abort (); 21 } 22