[PATCH] reorganize simplify_const_relational_operation

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Wed Sep 19 14:08:00 GMT 2007


Eric Botcazou wrote:
>> int
>> double_int_scmp (double_int a, double_int b)
>> {
>>    if (a.high < b.high)
>>      return -1;
>>    if (a.high > b.high)
>>      return 1;
>>    if ((HOST_WIDE_INT) a.low < (HOST_WIDE_INT) b.low)  /* oops? */
>>      return -1;
>>    if ((HOST_WIDE_INT) a.low > (HOST_WIDE_INT) b.low)  /* oops? */
>>      return 1;
>>
>>    return 0;
>> }
> 
> What sources are you looking at exactly?  Mine read:

Sources predating

2007-08-06  Chao-ying Fu  <fu@mips.com>

         * double-int.c (double_int_scmp): We should use unsigned
	HOST_WIDE_INT to compare a.low and b.low.

Paolo



More information about the Gcc-patches mailing list