1 /* { dg-do run } */
2 /* { dg-options "-O2 -mlzcnt" } */
3 /* { dg-require-effective-target lzcnt } */
4 
5 #include "lzcnt-check.h"
6 
7 int
8 __attribute__ ((noinline, noclone))
foo(unsigned short a)9 foo (unsigned short a)
10 {
11   return __builtin_clz (a);
12 }
13 
14 static void
lzcnt_test()15 lzcnt_test ()
16 {
17   int res = foo (1);
18 
19   if (res != 31)
20     abort ();
21 }
22