diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-04-30 16:15:55 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2013-04-30 16:15:55 +0000 |
commit | d6b28156145199ff1f096c8aa7c62fbf86306928 (patch) | |
tree | 6cc35ce9d38c53b9780ae1ed1c05fc03a67cc110 /gcc | |
parent | b0dec6074782cab0b40ae2b130a10f385ea40e07 (diff) | |
download | gcc-d6b28156145199ff1f096c8aa7c62fbf86306928.zip gcc-d6b28156145199ff1f096c8aa7c62fbf86306928.tar.gz gcc-d6b28156145199ff1f096c8aa7c62fbf86306928.tar.bz2 |
explow.c (plus_constant): Pass "mode" to immed_double_int_const.
gcc/
* explow.c (plus_constant): Pass "mode" to immed_double_int_const.
Use gen_int_mode rather than GEN_INT.
From-SVN: r198462
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/explow.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2122acc..b60098e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-04-30 Richard Sandiford <rsandifo@linux.vnet.ibm.com> + + * 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 <hongjiu.lu@intel.com> * value-prof.c (stream_in_histogram_value): Remove the strayed diff --git a/gcc/explow.c b/gcc/explow.c index 08a6653..7da8bc7 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: |