diff options
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r-- | gcc/config/arm/arm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 731dbe2..20b8fd7 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -4752,6 +4752,14 @@ arm_rtx_costs_1 (rtx x, enum rtx_code code, enum rtx_code outer) ? 0 : 4)); case MINUS: + if (GET_CODE (XEXP (x, 1)) == MULT && mode == SImode && arm_arch_thumb2) + { + extra_cost = rtx_cost (XEXP (x, 1), code); + if (!REG_OR_SUBREG_REG (XEXP (x, 0))) + extra_cost += 4 * ARM_NUM_REGS (mode); + return extra_cost; + } + if (mode == DImode) return (4 + (REG_OR_SUBREG_REG (XEXP (x, 1)) ? 0 : 8) + ((REG_OR_SUBREG_REG (XEXP (x, 0)) |