@@ -268,6 +268,7 @@ static int arm_cortex_a5_branch_cost (bool, bool);
static bool arm_vectorize_vec_perm_const_ok (enum machine_mode vmode,
const unsigned char *sel);
+static int arm_reg_reg_move_cost_for_mode (enum machine_mode mode);
/* Table of machine attributes. */
@@ -7637,6 +7638,13 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer,
int* total, bool speed)
return true;
case SET:
+ if (s_register_operand (SET_DEST (x), GET_MODE (SET_DEST (x)))
+ && s_register_operand (SET_SRC (x), GET_MODE (SET_SRC (x))))
+ {
+ *total = COSTS_N_INSNS (arm_reg_reg_move_cost_for_mode
+ (GET_MODE (SET_DEST (x))));
+ return true;
+ }
return false;