(form_sum): Use mode of inputs when making new PLUS.

From-SVN: r3928
This commit is contained in:
Richard Kenner 1993-03-30 15:34:11 -05:00
parent 118bdbf8fa
commit 2c0623e83a
1 changed files with 9 additions and 2 deletions

View File

@ -4138,6 +4138,13 @@ form_sum (x, y)
rtx x, y;
{
rtx tem;
enum machine_mode mode = GET_MODE (x);
if (mode == VOIDmode)
mode = GET_MODE (y);
if (mode == VOIDmode)
mode = Pmode;
if (GET_CODE (x) == CONST_INT)
return plus_constant (y, INTVAL (x));
@ -4163,10 +4170,10 @@ form_sum (x, y)
if (GET_CODE (y) == CONST)
y = XEXP (y, 0);
return gen_rtx (CONST, VOIDmode, gen_rtx (PLUS, Pmode, x, y));
return gen_rtx (CONST, VOIDmode, gen_rtx (PLUS, mode, x, y));
}
return gen_rtx (PLUS, Pmode, x, y);
return gen_rtx (PLUS, mode, x, y);
}
/* If ADDR is a sum containing a pseudo register that should be