Hi all,This is a much-delayed respin of the patch in response to Richards feedback at:
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00068.html
We now let recursion do its magic and just add the cost of the arithmetic operation on top.
Tested on arm-none-eabi Ok for trunk? 2014-11-12 Kyrylo Tkachov <kyrylo.tkac...@arm.com> * config/arm/arm.c (arm_new_rtx_costs, case PLUS, MINUS): Add cost of alu.arith in simple SImode case.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 4bada64..f1cd242 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -9615,6 +9615,8 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, *cost += rtx_cost (XEXP (x, 1), code, 1, speed_p); return true; } + else if (speed_p) + *cost += extra_cost->alu.arith; return false; } @@ -9850,6 +9852,9 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, *cost += rtx_cost (XEXP (x, 0), PLUS, 0, speed_p); return true; } + else if (speed_p) + *cost += extra_cost->alu.arith; + return false; }