diff options
Diffstat (limited to 'gcc/config/sh/sh.c')
-rw-r--r-- | gcc/config/sh/sh.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index bfa248d..e5b8088 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -3199,6 +3199,12 @@ sh_rtx_costs (rtx x, machine_mode mode ATTRIBUTE_UNUSED, int outer_code, vector-move, so we have to provide the correct cost in the number of move insns to load/store the reg of the mode in question. */ case SET: + if (sh_movt_set_dest (x) != NULL || sh_movrt_set_dest (x) != NULL) + { + *total = COSTS_N_INSNS (1); + return true; + } + if (register_operand (SET_DEST (x), VOIDmode) && (register_operand (SET_SRC (x), VOIDmode) || satisfies_constraint_Z (SET_SRC (x)))) @@ -3208,10 +3214,6 @@ sh_rtx_costs (rtx x, machine_mode mode ATTRIBUTE_UNUSED, int outer_code, / mov_insn_size (mode, TARGET_SH2A)); return true; } - - if (sh_movt_set_dest (x) != NULL || sh_movrt_set_dest (x) != NULL) - return COSTS_N_INSNS (1); - return false; /* The cost of a mem access is mainly the cost of the address mode. */ |