[Bug middle-end/15239] suboptimal mult-by-const expansion cost limit

wilson at specifixinc dot com gcc-bugzilla@gcc.gnu.org
Sat May 1 04:12:00 GMT 2004


------- Additional Comments From wilson at specifixinc dot com  2004-05-01 04:12 -------
Subject: Re:  suboptimal mult-by-const expansion cost
 limit

pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-01 00:11 -------
> This should be controlled by the target instead of the normal limit because on something like powerpc 
> multiply by an internment is only 6x (well it depends on the processor really) slower so adding too 
> many adds will just slow it down.

add_cost and mult_cost are both target values, so this is already 
controlled by the target in some sense.

The point of this check is to limit the number of adds we emit to at 
most 12 to avoid unreasonable code size expansion.  So if multiply is 
only 6x the speed of an add, then we will never hit this limit, and you 
don't have to worry about it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15239



More information about the Gcc-bugs mailing list