This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/15239] suboptimal mult-by-const expansion cost limit
- From: "wilson at specifixinc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 May 2004 04:12:57 -0000
- Subject: [Bug middle-end/15239] suboptimal mult-by-const expansion cost limit
- References: <20040430234603.15239.l_belev@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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