[AArch64] Remember to cost operand 0 in FP compare-with-0.0 case
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Fri, 1 May 2015 08:58:34 +0000 (08:58 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Fri, 1 May 2015 08:58:34 +0000 (08:58 +0000)
* config/aarch64/aarch64.c (aarch64_rtx_costs, COMPARE case):
Add cost of op0 in the compare-with-fpzero case.

From-SVN: r222673

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index d9241b12f16fccdb5e06e3c02daaed08069108c0..8646ae9c1bb485498e98bb64a168e4d230100e67 100644 (file)
@@ -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
index d7ef4734989fcd10a7711517dc7b51e7f0bba6e5..4573fb411932119220813dab553a29dc7c231513 100644 (file)
@@ -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;
             }