diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2122acc2350a..b60098e50029 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-04-30 Richard Sandiford + + * explow.c (plus_constant): Pass "mode" to immed_double_int_const. + Use gen_int_mode rather than GEN_INT. + 2013-04-30 H.J. Lu * value-prof.c (stream_in_histogram_value): Remove the strayed diff --git a/gcc/explow.c b/gcc/explow.c index 08a66537b904..7da8bc75f193 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -106,10 +106,10 @@ plus_constant (enum machine_mode mode, rtx x, HOST_WIDE_INT c) if (overflow) gcc_unreachable (); - return immed_double_int_const (v, VOIDmode); + return immed_double_int_const (v, mode); } - return GEN_INT (INTVAL (x) + c); + return gen_int_mode (INTVAL (x) + c, mode); case CONST_DOUBLE: { @@ -124,7 +124,7 @@ plus_constant (enum machine_mode mode, rtx x, HOST_WIDE_INT c) To fix, add constant support wider than CONST_DOUBLE. */ gcc_assert (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_DOUBLE_INT); - return immed_double_int_const (v, VOIDmode); + return immed_double_int_const (v, mode); } case MEM: