+2015-07-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_rtx_arith_op_extract_p):
+ Handle simple SIGN_EXTEND or ZERO_EXTEND.
+ (aarch64_rtx_costs): Properly strip extend or extract before
+ passing down to rtx costs again.
+
2015-07-28 Nick Clifton <nickc@redhat.com>
* config/rl78/rl78.c (rl78_addsi3_internal): New function.
return true;
}
}
+ /* The simple case <ARITH>, XD, XN, XM, [us]xt.
+ No shift. */
+ else if (GET_CODE (x) == SIGN_EXTEND
+ || GET_CODE (x) == ZERO_EXTEND)
+ return REG_P (XEXP (x, 0));
return false;
}
if (speed)
*cost += extra_cost->alu.extend_arith;
- *cost += rtx_cost (XEXP (XEXP (op1, 0), 0), VOIDmode,
+ op1 = aarch64_strip_extend (op1);
+ *cost += rtx_cost (op1, VOIDmode,
(enum rtx_code) GET_CODE (op1), 0, speed);
return true;
}
if (speed)
*cost += extra_cost->alu.extend_arith;
- *cost += rtx_cost (XEXP (XEXP (op0, 0), 0), VOIDmode,
+ op0 = aarch64_strip_extend (op0);
+ *cost += rtx_cost (op0, VOIDmode,
(enum rtx_code) GET_CODE (op0), 0, speed);
return true;
}