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.


On Fri, May 09, 2003 at 03:12:20AM +0100, Olly Betts wrote:
> This isn't directly relevant to the clz issue, but I notice that the
> above sequence isn't optimal for any ARM - this is better:
> 
> 	rsbs	out, in, #1
> 	movcc	out, #0
> 
> This is essentially: out = 1 - in; if ((unsigned)in > 1) out = 0;

Actually, it is relevant.  It brings us back down to one
target for which the clz transformation is profitable.


r~


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