This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: using clz for comparing to zero on the tree level.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Richard dot Earnshaw at arm dot com, Richard Henderson <rth at redhat dot com>, David Edelsohn <dje at watson dot ibm dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 09 May 2003 16:04:06 +0100
- Subject: Re: RFC: using clz for comparing to zero on the tree level.
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> In the case I mainly was considering was x==0||y==0, where on PPC (and
> mostly likely on ARM) the asm with clz would be shorter and faster,
>
On the ARM, that can be done as
cmp x, #0
cmpne y, #0
moveq out, #1
movne out, #0
Though I note that GCC is currently failing to optimize this case.
R.