blob: 92e53f1989f34af3a3eba565056bb2765c33899b [file] [log] [blame]
/* { dg-do run } */
/* { dg-options "-O2 -mlzcnt" } */
/* { dg-require-effective-target lzcnt } */
#include "lzcnt-check.h"
int
__attribute__ ((noinline, noclone))
foo (unsigned short a)
{
return __builtin_clz (a);
}
static void
lzcnt_test ()
{
int res = foo (1);
if (res != 31)
abort ();
}