https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114224
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> Note after r15-2946-gfcc3af99498804, for:
> ```
> int fc(unsigned char a)
> {
> return __builtin_popcountg(a) == 1;
> }
> ```
>
> Without CSSC, GCC produces:
> ```
> and w0, w0, 255
> fmov d31, x0
> cnt v31.8b, v31.8b
> smov w0, v31.b[0]
> cmp w0, 1
> cset w0, eq
> ret
> ```
>
> Plus there is a missing optimization.
> It should just be:
> ```
> fmov b31, w0
> ```
Oh that expansion issue is not just a cost issue. I will work on that tomorrow.
Today is just the cost issue.