[AArch64 costs] Fixup to costing of FNMUL

gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Fix FNMUL case.

From-SVN: r210512
This commit is contained in:
James Greenhalgh 2014-05-16 10:15:54 +00:00 committed by James Greenhalgh
parent a2f4bd2ae1
commit 3d840f7d1f
2 changed files with 8 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2014-05-16 James Greenhalgh <james.greenhalgh@arm.com>
* config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Fix FNMUL case.
2014-05-16 James Greenhalgh <james.greenhalgh@arm.com>
* config/aarch64/aarch64.c (aarch64_rtx_costs): Handle the case

View File

@ -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;
}