[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: teaching gcc's optimiser new tricks



On Sat, 2002-08-03 at 17:36, Nicholas Clark wrote:
> 	cmp	r4, #0
> 	movne	ip, #0
> 	moveq	ip, #1 
> 
> how does one teach the optimiser that this is equivalent and 33% faster:
> 
> 	rsbs     ip, r4, #1
> 	movls    ip, #0

Oh, that's rather clever.  Look at the compare_scc pattern in arm.md,
that's where this stuff all happens.

p.



Reply to: