sh.c (shiftcosts): Don't use shiftcosts array for modes wider than SImode.

* sh.c (shiftcosts): Don't use shiftcosts array for modes wider
	than SImode.

From-SVN: r45709
This commit is contained in:
J"orn Rennecke 2001-09-20 14:25:11 +00:00 committed by Joern Rennecke
parent ed1a150e05
commit c762ab6ebb
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Thu Sep 20 12:49:34 2001 J"orn Rennecke <amylaar@redhat.com>
* sh.c (shiftcosts): Don't use shiftcosts array for modes wider
than SImode.
Thu Sep 20 09:00:27 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* stor-layout.c (layout_type, case ARRAY_TYPE): Kludge to disable

View File

@ -1019,6 +1019,16 @@ shiftcosts (x)
{
int value;
if (GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD)
{
if (GET_MODE (x) == DImode
&& GET_CODE (XEXP (x, 1)) == CONST_INT
&& INTVAL (XEXP (x, 1)) == 1)
return 2;
/* Everything else is invalid, because there is no pattern for it. */
return 10000;
}
/* If shift by a non constant, then this will be expensive. */
if (GET_CODE (XEXP (x, 1)) != CONST_INT)
return SH_DYNAMIC_SHIFT_COST;