Sign-extend CONST_INTs within their modes

Alexandre Oliva aoliva@redhat.com
Wed Apr 11 19:54:00 GMT 2001


On Apr 10, 2001, Richard Henderson <rth@redhat.com> wrote:

> On Wed, Apr 04, 2001 at 12:22:24PM -0300, Alexandre Oliva wrote:
>> @@ -1108,6 +1108,12 @@ general_operand (op, mode)
>> && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT)
>> return 0;
>> 
>> +#ifdef ENABLE_CHECKING
>> +  if (GET_CODE (op) == CONST_INT
>> +      && trunc_int_for_mode (INTVAL (op), mode) != INTVAL (op))
>> +    return 0;
>> +#endif

> I don't think these should be ENABLE_CHECKING.  If we did that it
> could drastically change what patterns combine thinks it can create.

For the record, here's the modified recog.c patch.  The rest of the
patch is about to go in unchanged.



More information about the Gcc-patches mailing list