RFC: using clz for comparing to zero on the tree level.

Richard Earnshaw rearnsha@arm.com
Fri May 9 15:04:00 GMT 2003


> 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.




More information about the Gcc mailing list