explow.c (plus_constant): Pass "mode" to immed_double_int_const.
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 30 Apr 2013 16:15:55 +0000 (16:15 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 30 Apr 2013 16:15:55 +0000 (16:15 +0000)
gcc/
* explow.c (plus_constant): Pass "mode" to immed_double_int_const.
Use gen_int_mode rather than GEN_INT.

From-SVN: r198462

gcc/ChangeLog
gcc/explow.c

index 2122acc2350abb917453f0363f9590dcb3b2d80c..b60098e500299eaba52a3c1360edf440de912d94 100644 (file)
@@ -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
index 08a66537b904656b224aa77fce7a44fbe617a2c9..7da8bc75f1937d681246bea0cbbfe27a0dab306f 100644 (file)
@@ -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: