PR target/17101: question about powerpc s<cond> expanders

Nathan Sidwell nathan@codesourcery.com
Fri Nov 12 19:30:00 GMT 2004


David Edelsohn wrote:

> Nathan> why is that?  The unsigned variants are not so encumbered.
> 
> 	There are short, straight-line PowerPC code sequences for
> unsigned, but not for signed.  The signed sequences use the POWER "doz"
> instruction that was removed from PowerPC.

that is not what I observe, when I remove the TARGET_POWER check.
For instance, V > 55
.sgt:
         cmpwi 7,3,55
         mfcr 3
         rlwinm 3,3,30,1
is that worse than
	li  9,0
	cmpwe 7,3,55
	ble- 7,.skip
	li  9,1
.skip:

> 	The number of instructions do not correspond to the cost.
> Compares, moving bits from condition registers, and bit extraction is
> slower on newer PowerPC processors.
ok, that makes sense. there should probably be an optimize_size check
though. thanks.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gcc mailing list