From: Kyrylo Tkachov Date: Thu, 4 Feb 2016 09:54:37 +0000 (+0000) Subject: [ARM][2/4] Fix operand costing logic for SMUL[TB][TB] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9fec9595fb7a7ee6fcd200443d0e4bd7a34fd734;p=gcc.git [ARM][2/4] Fix operand costing logic for SMUL[TB][TB] PR target/65932 PR target/67714 * config/arm/arm.c (arm_new_rtx_costs, MULT case): Properly extract the operands of the SIGN_EXTENDs from a SMUL[TB][TB] rtx. From-SVN: r233132 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4146241e9a3..d5936b78d11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-02-04 Kyrylo Tkachov + + PR target/65932 + PR target/67714 + * config/arm/arm.c (arm_new_rtx_costs, MULT case): Properly extract + the operands of the SIGN_EXTENDs from a SMUL[TB][TB] rtx. + 2016-02-04 Jim Wilson PR target/65932 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index e656a01d2b7..f7debcfdb60 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -10318,8 +10318,10 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, /* SMUL[TB][TB]. */ if (speed_p) *cost += extra_cost->mult[0].extend; - *cost += rtx_cost (XEXP (x, 0), mode, SIGN_EXTEND, 0, speed_p); - *cost += rtx_cost (XEXP (x, 1), mode, SIGN_EXTEND, 1, speed_p); + *cost += rtx_cost (XEXP (XEXP (x, 0), 0), mode, + SIGN_EXTEND, 0, speed_p); + *cost += rtx_cost (XEXP (XEXP (x, 1), 0), mode, + SIGN_EXTEND, 1, speed_p); return true; } if (speed_p)