2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr81015.c
blob92e53f1989f34af3a3eba565056bb2765c33899b
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mlzcnt" } */
3 /* { dg-require-effective-target lzcnt } */
5 #include "lzcnt-check.h"
7 int
8 __attribute__ ((noinline, noclone))
9 foo (unsigned short a)
11 return __builtin_clz (a);
14 static void
15 lzcnt_test ()
17 int res = foo (1);
19 if (res != 31)
20 abort ();