This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] genrecog: simplify jumps around case DT_const_int
- From: Bernhard Fischer <rep dot dot dot nop at gmail dot com>
- To: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- Cc: gcc-patches at gcc dot gnu dot org, Bernhard Fischer <rep dot dot dot nop at gmail dot com>
- Date: Mon, 27 Aug 2007 23:39:43 +0200
- Subject: Re: [patch] genrecog: simplify jumps around case DT_const_int
- References: <20070822211651.GB11697@aon.at> <20070827213256.GM25795@sygehus.dk>
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.