Hi,

As recently done for Cortex-A57 [1], this patch rebases the floating-point
cost table for Cortex-A53 to be relative to the cost of a floating-point move.
I wrote a little more on the justification for doing this in the other patch,
but in summary this is what other targets and sub-targets do, so we should
fall in line with that.

Unlike the Cortex-A57 changes, this had no performance impact across
Spec2000 and Spec2006. I'm posting it to keep the strategy for costs
aligned between the two cores.

Bootstrapped on aarch64-none-linux-gnu and arm-none-linux-gnueabihf with
no issues.

OK?

Thanks,
James

[1]: https://gcc.gnu.org/ml/gcc-patches/2016-06/msg00251.html

---
2016-06-20  James Greenhalgh  <james.greenha...@arm.com>

        * config/arm/aarch-cost-tables.h (cortexa53_extra_costs): Make FP
        costs relative to the cost of a register move.
diff --git a/gcc/config/arm/aarch-cost-tables.h b/gcc/config/arm/aarch-cost-tables.h
index 5f42253..8bcfcb4 100644
--- a/gcc/config/arm/aarch-cost-tables.h
+++ b/gcc/config/arm/aarch-cost-tables.h
@@ -191,35 +191,35 @@ const struct cpu_cost_table cortexa53_extra_costs =
   {
     /* FP SFmode */
     {
-      COSTS_N_INSNS (15),	/* div.  */
-      COSTS_N_INSNS (3),	/* mult.  */
-      COSTS_N_INSNS (7),	/* mult_addsub. */
-      COSTS_N_INSNS (7),	/* fma.  */
-      COSTS_N_INSNS (3),	/* addsub.  */
-      COSTS_N_INSNS (1),	/* fpconst. */
-      COSTS_N_INSNS (2),	/* neg.  */
-      COSTS_N_INSNS (1),	/* compare.  */
-      COSTS_N_INSNS (3),	/* widen.  */
-      COSTS_N_INSNS (3),	/* narrow.  */
-      COSTS_N_INSNS (3),	/* toint.  */
-      COSTS_N_INSNS (3),	/* fromint.  */
-      COSTS_N_INSNS (3)		/* roundint.  */
+      COSTS_N_INSNS (5),	/* div.  */
+      COSTS_N_INSNS (1),	/* mult.  */
+      COSTS_N_INSNS (2),	/* mult_addsub.  */
+      COSTS_N_INSNS (2),	/* fma.  */
+      COSTS_N_INSNS (1),	/* addsub.  */
+      0,			/* fpconst.  */
+      COSTS_N_INSNS (1),	/* neg.  */
+      0,			/* compare.  */
+      COSTS_N_INSNS (1),	/* widen.  */
+      COSTS_N_INSNS (1),	/* narrow.  */
+      COSTS_N_INSNS (1),	/* toint.  */
+      COSTS_N_INSNS (1),	/* fromint.  */
+      COSTS_N_INSNS (1)		/* roundint.  */
     },
     /* FP DFmode */
     {
-      COSTS_N_INSNS (30),	/* div.  */
-      COSTS_N_INSNS (3),	/* mult.  */
-      COSTS_N_INSNS (7),	/* mult_addsub.  */
-      COSTS_N_INSNS (7),	/* fma.  */
-      COSTS_N_INSNS (3),	/* addsub.  */
-      COSTS_N_INSNS (1),	/* fpconst.  */
-      COSTS_N_INSNS (2),	/* neg.  */
-      COSTS_N_INSNS (1),	/* compare.  */
-      COSTS_N_INSNS (3),	/* widen.  */
-      COSTS_N_INSNS (3),	/* narrow.  */
-      COSTS_N_INSNS (3),	/* toint.  */
-      COSTS_N_INSNS (3),	/* fromint.  */
-      COSTS_N_INSNS (3)		/* roundint.  */
+      COSTS_N_INSNS (10),	/* div.  */
+      COSTS_N_INSNS (1),	/* mult.  */
+      COSTS_N_INSNS (2),	/* mult_addsub.  */
+      COSTS_N_INSNS (2),	/* fma.  */
+      COSTS_N_INSNS (1),	/* addsub.  */
+      0,			/* fpconst.  */
+      COSTS_N_INSNS (1),	/* neg.  */
+      0,			/* compare.  */
+      COSTS_N_INSNS (1),	/* widen.  */
+      COSTS_N_INSNS (1),	/* narrow.  */
+      COSTS_N_INSNS (1),	/* toint.  */
+      COSTS_N_INSNS (1),	/* fromint.  */
+      COSTS_N_INSNS (1)		/* roundint.  */
     }
   },
   /* Vector */

Reply via email to