[patch] genrecog: simplify jumps around case DT_const_int

Bernhard Fischer rep.dot.nop@gmail.com
Mon Aug 27 22:11:00 GMT 2007


On Mon, Aug 27, 2007 at 11:32:56PM +0200, Rask Ingemann Lambertsen wrote:
>On Wed, Aug 22, 2007 at 11:16:51PM +0200, Bernhard Fischer wrote:
>
>> Index: gcc-4.3/gcc/genrecog.c
>> ===================================================================
>> --- gcc-4.3/gcc/genrecog.c	(revision 127717)
>> +++ gcc-4.3/gcc/genrecog.c	(working copy)
>> @@ -2110,8 +2110,11 @@ write_cond (struct decision_test *p, int
>>        break;
>>  
>>      case DT_const_int:
>> -      printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
>> -	      depth, (int) p->u.intval);
>> +      if ((int) p->u.intval)
>> +	printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
>> +		depth, (int) p->u.intval);
>> +      else
>> +	printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT]", depth);
>>        break;
>>  
>>      case DT_veclen_ge:
>
>   Just wondering: How much does this improve in terms of code size or
>execution speed?

Not too much, i assume. The generated code has just one jump less, at
most. It's just a cosmetic correction, AFAIC.



More information about the Gcc-patches mailing list