[ARM][2/4] Fix operand costing logic for SMUL[TB][TB]
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 4 Feb 2016 09:54:37 +0000 (09:54 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 4 Feb 2016 09:54:37 +0000 (09:54 +0000)
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

gcc/ChangeLog
gcc/config/arm/arm.c

index 4146241e9a3dde1aa8c07b882da570c7f0708a7b..d5936b78d11cd9ecdbe3f1adc1e5c9071fa04e92 100644 (file)
@@ -1,3 +1,10 @@
+2016-02-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       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  <jim.wilson@linaro.org>
 
        PR target/65932
index e656a01d2b73f02847b56eb9cb833df2fa37c890..f7debcfdb604771176a20be0ad5ea143cf1b97a7 100644 (file)
@@ -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)