This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PowerPC multiply and -Os
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: Geoff Keating <geoffk at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 01 Aug 2002 20:54:26 -0400
- Subject: Re: PowerPC multiply and -Os
>>>>> Dale Johannesen writes:
Dale> (Funny, Apple is probably more concerned about code size than the next 5
Dale> companies
Dale> put together, but this case never showed up.)
It all depends on the cost. For most processors, the cost in this
case (multiply by 10, which is less than 256) is 3 cycles, so multiply
wins. It's only for some slower processors, like the default for
-mcpu=powerpc, where the cost is larger, making the 5-cycle sequence least
cost. It probably doesn't occur for any processors Apple currently uses.
David