Hi,

On Tue, 9 Jul 2013, David Given wrote:

> Trying 8, 9 -> 10:
> Successfully matched this instruction:
> (set (reg:SI 47 [ *_5 ])
>     (mem:SI (plus:SI (mult:SI (reg/v:SI 43 [ b ])
>                 (const_int 4 [0x4]))
>             (reg:SI 0 r0 [ a ])) [2 *_5+0 S4 A32]))
> rejecting combination of insns 8, 9 and 10
> original costs 8 + 4 + 4 = 16
> replacement cost 32
> 
> So, how is it calculating the cost of my instruction? Where's it getting
> that 32 from (which seems weirdly high)?

As you didn't adjust any cost I would guess the high value comes from the 
default implementation of address_cost, which simply uses arithmetic cost, 
and the MULT in there is quite expensive by default.

See TARGET_ADDRESS_COST in several ports.


Ciao,
Michael.

Reply via email to