From e8c430897708622510974ecff782d3ac8cac1d1b Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Tue, 18 Nov 2014 09:33:25 +0000 Subject: [PATCH] [ARM] Handle simple SImode PLUS and MINUS cases in rtx costs * config/arm/arm.c (arm_new_rtx_costs, case PLUS, MINUS): Add cost of alu.arith in simple SImode case. From-SVN: r217692 --- gcc/ChangeLog | 5 +++++ gcc/config/arm/arm.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b303164e248..95f5fa308b5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-11-18 Kyrylo Tkachov + + * config/arm/arm.c (arm_new_rtx_costs, case PLUS, MINUS): + Add cost of alu.arith in simple SImode case. + 2014-11-18 Jiong Wang * lra-eliminations.c (update_reg_eliminate): Relax gcc_assert for fixed diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a4212d1d916..f9c82a5e5b1 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -9822,6 +9822,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; } @@ -10057,6 +10059,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; } -- 2.30.2