From 3d840f7d1f4b0172b8179e6e0a41694fc88fde67 Mon Sep 17 00:00:00 2001 From: James Greenhalgh Date: Fri, 16 May 2014 10:15:54 +0000 Subject: [PATCH] [AArch64 costs] Fixup to costing of FNMUL gcc/ * config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Fix FNMUL case. From-SVN: r210512 --- gcc/ChangeLog | 4 ++++ gcc/config/aarch64/aarch64.c | 14 ++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1815d4b0def..4ec3c7d2a11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-05-16 James Greenhalgh + + * config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Fix FNMUL case. + 2014-05-16 James Greenhalgh * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle the case diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 6eb230349b4..0a7f441941c 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -4711,24 +4711,18 @@ aarch64_rtx_mult_cost (rtx x, int code, int outer, bool speed) { if (speed) { - /* Floating-point FMA can also support negations of the + /* Floating-point FMA/FMUL can also support negations of the operands. */ if (GET_CODE (op0) == NEG) - { - maybe_fma = true; - op0 = XEXP (op0, 0); - } + op0 = XEXP (op0, 0); if (GET_CODE (op1) == NEG) - { - maybe_fma = true; - op1 = XEXP (op1, 0); - } + op1 = XEXP (op1, 0); if (maybe_fma) /* FMADD/FNMADD/FNMSUB/FMSUB. */ cost += extra_cost->fp[mode == DFmode].fma; else - /* FMUL. */ + /* FMUL/FNMUL. */ cost += extra_cost->fp[mode == DFmode].mult; }