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: Andrew Pinski <pinskia at physics dot uc dot edu>
- 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, 9 May 2003 10:52:02 -0400
- Subject: Re: RFC: using clz for comparing to zero on the tree level.
I accidentally send the email before I was finished.
On Friday, May 9, 2003, at 10:46 US/Eastern, Andrew Pinski wrote:
I think I have a patch for the rs6000 machine description that changes
seq to do the expand (I have bootstrapped on ppc-darwin), the only
problem is that it produces slower code for (i==0)+a ().
(the old way is faster and smaller):
subfic t,i,0
addze out,a
(with clz):
cntlzw t,i
srwi t1,t,5
add out,a,t1
This can be fixed by a peephole though (I have not done it yet because
I am busy with classes lately).
Thanks,
Andrew Pinski
Thanks,
Andrew Pinski