This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] genrecog.c: Simplify comparisons against small constants in insn-recog.c.


On Thu, Jan 29, 2004 at 12:08:16AM -0800, Zack Weinberg wrote:
> Kazu Hirata <kazu@cs.umass.edu> 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.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]