+2008-03-15 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/arm.c (arm_rtx_costs_1): Add costs for ARMv6 value
+ extension instructions.
+
2008-03-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (ccp_fold): Also read from constant values
/* Fall through */
case PLUS:
+ if (arm_arch6 && mode == SImode
+ && (GET_CODE (XEXP (x, 0)) == ZERO_EXTEND
+ || GET_CODE (XEXP (x, 0)) == SIGN_EXTEND))
+ return 1 + (GET_CODE (XEXP (XEXP (x, 0), 0)) == MEM ? 10 : 0)
+ + (GET_CODE (XEXP (x, 1)) == MEM ? 10 : 0);
+
if (GET_CODE (XEXP (x, 0)) == MULT)
{
extra_cost = rtx_cost (XEXP (x, 0), code);
return 4 + (mode == DImode ? 4 : 0);
case SIGN_EXTEND:
- /* ??? value extensions are cheaper on armv6. */
+ if (arm_arch_thumb2 && mode == SImode)
+ return 1 + (GET_CODE (XEXP (x, 0)) == MEM ? 10 : 0);
+
if (GET_MODE (XEXP (x, 0)) == QImode)
return (4 + (mode == DImode ? 4 : 0)
+ (GET_CODE (XEXP (x, 0)) == MEM ? 10 : 0));
/* Fall through */
case ZERO_EXTEND:
+ if (arm_arch6 && mode == SImode)
+ return 1 + (GET_CODE (XEXP (x, 0)) == MEM ? 10 : 0);
+
switch (GET_MODE (XEXP (x, 0)))
{
case QImode: