Commit b32f6fff by Kazu Hirata Committed by Kazu Hirata

arm.c (arm_rtx_costs_1): Treat a minus with a shift the same as a minus without a shift.

	* config/arm/arm.c (arm_rtx_costs_1): Treat a minus with a shift
	the same as a minus without a shift.

From-SVN: r146055
parent f9b20c62
2009-04-14 Kazu Hirata <kazu@codesourcery.com>
* config/arm/arm.c (arm_rtx_costs_1): Treat a minus with a shift
the same as a minus without a shift.
2009-04-14 Nick Clifton <nickc@redhat.com> 2009-04-14 Nick Clifton <nickc@redhat.com>
* config/stormy16/stormy16.md (ineqbranch_1): Do not assume that * config/stormy16/stormy16.md (ineqbranch_1): Do not assume that
......
...@@ -5139,6 +5139,17 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed) ...@@ -5139,6 +5139,17 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed)
return true; return true;
} }
/* A shift as a part of RSB costs no more than RSB itself. */
if (GET_CODE (XEXP (x, 0)) == MULT
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT
&& ((INTVAL (XEXP (XEXP (x, 0), 1))
& (INTVAL (XEXP (XEXP (x, 0), 1)) - 1)) == 0))
{
*total += rtx_cost (XEXP (XEXP (x, 0), 0), code, speed);
*total += rtx_cost (XEXP (x, 1), code, speed);
return true;
}
if (subcode == MULT if (subcode == MULT
&& GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT
&& ((INTVAL (XEXP (XEXP (x, 1), 1)) & && ((INTVAL (XEXP (XEXP (x, 1), 1)) &
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment