From 3839f0565908adc0727c34b708c3acc0c84aff13 Mon Sep 17 00:00:00 2001 From: jiwang Date: Fri, 12 Sep 2014 09:42:42 +0000 Subject: [PATCH] [AArch64] Fix cost for Q register moves 2014-09-12 Wilco Dijkstra * gcc/config/aarch64/aarch64.c (aarch64_register_move_cost): Fix Q register move handling. (generic_regmove_cost): Undo raised FP2FP move cost as Q register moves are now handled correctly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215207 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/aarch64/aarch64.c | 7 ++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 37202e8c87c..b10f285bcd7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2014-09-12 Wilco Dijkstra + * config/aarch64/aarch64.c (aarch64_register_move_cost): Fix Q register + move handling. + (generic_regmove_cost): Undo raised FP2FP move cost as Q register moves + are now handled correctly. + +2014-09-12 Wilco Dijkstra + * config/aarch64/aarch64.c (aarch64_register_move_cost): Add cost handling of CALLER_SAVE_REGS and POINTER_REGS. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 6f21fd9239b..73ddb0db98b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -215,10 +215,7 @@ static const struct cpu_regmove_cost generic_regmove_cost = NAMED_PARAM (GP2GP, 1), NAMED_PARAM (GP2FP, 2), NAMED_PARAM (FP2GP, 2), - /* 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. */ - NAMED_PARAM (FP2FP, 4) + NAMED_PARAM (FP2FP, 2) }; /* Generic costs for vector insn classes. */ @@ -5961,7 +5958,7 @@ aarch64_register_move_cost (enum machine_mode mode, secondary reload. A general register is used as a scratch to move the upper DI value and the lower DI value is moved directly, hence the cost is the sum of three moves. */ - if (! TARGET_SIMD && GET_MODE_SIZE (mode) == 128) + if (! TARGET_SIMD && GET_MODE_SIZE (mode) == 16) return regmove_cost->GP2FP + regmove_cost->FP2GP + regmove_cost->FP2FP; return regmove_cost->FP2FP; -- 2.11.4.GIT