aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2015-05-01 08:58:34 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2015-05-01 08:58:34 +0000
commitad88bedb893145500aba3993f7bfa4e2d0041435 (patch)
tree7ad6ceb1a3c7e0ec0217cf10399e6ecbd3e5373f
parent6358f1b4369f87f736cc7449da5021270db51904 (diff)
downloadgcc-ad88bedb893145500aba3993f7bfa4e2d0041435.zip
gcc-ad88bedb893145500aba3993f7bfa4e2d0041435.tar.gz
gcc-ad88bedb893145500aba3993f7bfa4e2d0041435.tar.bz2
[AArch64] Remember to cost operand 0 in FP compare-with-0.0 case
* config/aarch64/aarch64.c (aarch64_rtx_costs, COMPARE case): Add cost of op0 in the compare-with-fpzero case. From-SVN: r222673
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/aarch64/aarch64.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d9241b1..8646ae9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_rtx_costs, COMPARE case):
+ Add cost of op0 in the compare-with-fpzero case.
+
2015-04-30 David Malcolm <dmalcolm@redhat.com>
* builtins.c (fold_builtin_1): Remove spurious second
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index d7ef473..4573fb4 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -5865,6 +5865,7 @@ aarch64_rtx_costs (rtx x, int code, int outer ATTRIBUTE_UNUSED,
if (CONST_DOUBLE_P (op1) && aarch64_float_const_zero_rtx_p (op1))
{
+ *cost += rtx_cost (op0, COMPARE, 0, speed);
/* FCMP supports constant 0.0 for no extra cost. */
return true;
}