Commit 2c0623e8 by Richard Kenner

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

From-SVN: r3928
parent 118bdbf8
......@@ -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
......
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