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
arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
popcount2.c
blob
ae38a329bd4d868a762300d3218d68864c0fc4be
1
/* { dg-do run } */
2
/* { dg-require-effective-target popcountl } */
3
/* { dg-options "-O2 -fno-tree-ch -fdump-tree-optimized" } */
4
5
int
6
__attribute__
((
noinline
,
noclone
))
7
foo
(
long
b
)
8
{
9
int
c
=
0
;
10
11
while
(
b
) {
12
b
&=
b
-
1
;
13
c
++;
14
}
15
return
c
;
16
}
17
18
int
main
()
19
{
20
if
(
foo
(
7
) !=
3
)
21
__builtin_abort
();
22
if
(
foo
(
0
) !=
0
)
23
__builtin_abort
();
24
if
(
foo
(
0xff
) !=
8
)
25
__builtin_abort
();
26
return
0
;
27
}
28
29
/* { dg-final { scan-tree-dump-times "__builtin_popcount|\\.POPCOUNT" 1 "optimized" } } */