git cherry-pick 8c31cc6
gcc/
* config/aarch64/aarch64.c (aarch64_rtx_costs): Set default costs.
Change-Id: I66a380a13616fa0572d2b6597f2ca5416479fd54
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210498
138bc75d-0d04-0410-961f-
82ee72b054a4
2014-05-16 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_rtx_costs): Set default costs.
+
+2014-05-16 James Greenhalgh <james.greenhalgh@arm.com>
Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Rename
= aarch64_tune_params->insn_extra_cost;
enum machine_mode mode = GET_MODE (x);
+ /* By default, assume that everything has equivalent cost to the
+ cheapest instruction. Any additional costs are applied as a delta
+ above this default. */
+ *cost = COSTS_N_INSNS (1);
+
+ /* TODO: The cost infrastructure currently does not handle
+ vector operations. Assume that all vector operations
+ are equally expensive. */
+ if (VECTOR_MODE_P (mode))
+ {
+ if (speed)
+ *cost += extra_cost->vect.alu;
+ return true;
+ }
+
switch (code)
{
case SET: