This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]