[csl-asm?] PR middle-end/11821: Tweak arm_rtx_costs_1

Richard Earnshaw rearnsha@arm.com
Fri Nov 21 10:22:00 GMT 2003


 
> Unfortunately, it looks like the special RTXen it generates to query the
> backend, PLUS (reg, MULT (reg, const_int)), etc..., aren't treated or
> handled specially by the ARM backend's arm_rtx_costs_1 at all.  The x86
> backend's ix86_rtx_costs, on the other hand, does check for these
> patterns, makes sure the constant multiplier is 2, 4 or 8 and returns
> the CPU's cost for using a single "lea" instruction.


What makes you say this?  I've just had a look at the code and init_expmed 
gets a cost of 1 for all of add_cost, shiftadd_cost[*] and 
shiftsub_cost[*].

So it looks to me as though the costs are about right.  It is certainly 
spotting this case (look at the way PLUS falls through into AND, IOR etc).

R.



More information about the Gcc-patches mailing list