This is the mail archive of the
mailing list for the GCC project.
Re: [patch] genrecog.c: Simplify comparisons against small constants in insn-recog.c.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Kazu Hirata <kazu at cs dot umass dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jan 2004 03:26:28 -0500
- Subject: Re: [patch] genrecog.c: Simplify comparisons against small constants in insn-recog.c.
- References: <email@example.com> <firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jan 29, 2004 at 12:08:16AM -0800, Zack Weinberg wrote:
> Kazu Hirata <email@example.com> writes:
> > Hi,
> > Attached is a patch to simplify comparisons against small constants in
> > insn-recog.c by replacing
> > if (GET_CODE (x3) == CONST_INT
> > && XWINT (x3, 0) == 10L
> > && ...
> > with
> > if (x3 == const_int_rtx[MAX_SAVED_CONST_INT + (10)]
> Uhh... that doesn't look equivalent to me.
Why (assuming that code is not executed before init_emit_once, that is)?
CONST_INT equality is an invariant maintained by gen_rtx_CONST_INT.