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
testcase: Add testcase for PR 117330 [PR117330]
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
aarch64
/
cssc_2.c
blob
1637d29c6dc20c0eb55c5f3d05157b5b6c581fdc
1
/* { dg-do compile } */
2
/* { dg-additional-options "--save-temps -O1" } */
3
/* { dg-final { check-function-bodies "**" "" "" } } */
4
5
#include <stdint.h>
6
7
#pragma GCC target
"+cssc"
8
9
/*
10
** cntw:
11
** cnt w0, w0
12
** ret
13
*/
14
15
int32_t
16
cntw
(
int32_t
a
)
17
{
18
return
__builtin_popcount
(
a
);
19
}
20
21
/*
22
** cntx:
23
** cnt x0, x0
24
** ret
25
*/
26
27
int64_t
28
cntx
(
int64_t
a
)
29
{
30
return
__builtin_popcountll
(
a
);
31
}
32