Hi, On Wed, 21 Mar 2012, Mike Stump wrote:
> --- a/gcc/emit-rtl.c > +++ b/gcc/emit-rtl.c > @@ -531,10 +531,9 @@ immed_double_const (HOST_WIDE_INT i0, HOST_WIDE_INT i1, > enum machine_mode mode) > > 1) If GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT, then we use > gen_int_mode. > - 2) GET_MODE_BITSIZE (mode) == 2 * HOST_BITS_PER_WIDE_INT, but the value > of > - the integer fits into HOST_WIDE_INT anyway (i.e., i1 consists only > - from copies of the sign bit, and sign of i0 and i1 are the same), then > - we return a CONST_INT for i0. > + 2) If the value of the integer fits into HOST_WIDE_INT anyway > + (i.e., i1 consists only from copies of the sign bit, and sign > + of i0 and i1 are the same), then we return a CONST_INT for i0. I see that you didn't remove the assert as part of this patch. I'd like to see what you like to do to this routine once the rest goes in. In particular I don't think just removing the assert will be enough, at the very least the block comment should be saying something about what the routine exactly does (or doesn't do) for modes where the two HWI arguments can't specify all bits. My point is, for large modes i0 and i1 will only specify the low 2*HWIbits bits. Something needs to document what the upper bits will be (be they implicit or explicit), otherwise people reading the comment will always wonder what exactly is supposed to happen. I'm not 100% sure what it should say, though. Probably the interpretation of the upper bits depends on the users of the so generated CONST_DOUBLEs. Ciao, Michael.