From f6a5feaff996764cdc4a318aef9e3747a7907f56 Mon Sep 17 00:00:00 2001 From: Junmo Park Date: Thu, 13 Aug 2015 00:15:02 +0900 Subject: [4.9] Adjust generic move costs for aarch64. Backport from trunk 2014-11-19 Wilco Dijkstra PR target/61915 * config/aarch64/aarch64.c (generic_regmove_cost): Increase FP move cost. Change-Id: Ifaa0c2d1a72955e42f3882c68d1e52acf5a790e7 Signed-off-by: Junmo Park --- gcc-4.9/ChangeLog | 6 ++++++ gcc-4.9/gcc/config/aarch64/aarch64.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc-4.9/ChangeLog b/gcc-4.9/ChangeLog index 9574f7afa..207f2caf5 100644 --- a/gcc-4.9/ChangeLog +++ b/gcc-4.9/ChangeLog @@ -23,6 +23,12 @@ * Makefile.in: Regenerate. * configure: Regenerate. +2014-11-19 Wilco Dijkstra + + PR target/61915 + * config/aarch64/aarch64.c (generic_regmove_cost): Increase FP move + cost. + 2014-11-19 Renlin Li PR middle-end/63762 diff --git a/gcc-4.9/gcc/config/aarch64/aarch64.c b/gcc-4.9/gcc/config/aarch64/aarch64.c index 72d1231ec..9c4ced486 100644 --- a/gcc-4.9/gcc/config/aarch64/aarch64.c +++ b/gcc-4.9/gcc/config/aarch64/aarch64.c @@ -184,8 +184,10 @@ __extension__ static const struct cpu_regmove_cost generic_regmove_cost = { NAMED_PARAM (GP2GP, 1), - NAMED_PARAM (GP2FP, 2), - NAMED_PARAM (FP2GP, 2), + /* Avoid the use of slow int<->fp moves for spilling by setting + their cost higher than memmov_cost. */ + NAMED_PARAM (GP2FP, 5), + NAMED_PARAM (FP2GP, 5), /* We currently do not provide direct support for TFmode Q->Q move. Therefore we need to raise the cost above 2 in order to have reload handle the situation. */ -- cgit v1.2.3