repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR rtl-optimization/87918
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
i386
/
pr81015.c
blob
92e53f1989f34af3a3eba565056bb2765c33899b
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
))
9
foo
(
unsigned short
a
)
10
{
11
return
__builtin_clz
(
a
);
12
}
13
14
static void
15
lzcnt_test
()
16
{
17
int
res
=
foo
(
1
);
18
19
if
(
res
!=
31
)
20
abort
();
21
}