> Kyrill Tkachov wrote:
> A testcase I was looking at is:
> int
> foo (int a)
> {
>    return (a & 7) != 0;
> }
> 
> For me this generates:
>          and     w0, w0, 7
>          cmp     w0, wzr
>          cset    w0, ne
>          ret
> 
> when it could be:
>          tst      w0, 7
>          cset     w0, ne
>          ret

Indeed. And return (a & 14) != 0; generates a tst just fine (this should be an 
actual zero_extract:
((a >> 1) & 7) != 0 - but somehow it doesn't get converted into one...).

Wilco



Reply via email to