This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: genrecog.c tweak
- To: jh at suse dot cz
- Subject: Re: genrecog.c tweak
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Fri, 18 May 01 17:59:22 EDT
- Cc: gcc-patches at gcc dot gnu dot org
If I understand it properly, it still generate switch statement if all
values for "case" fits in host integer. This looks still wrong to me, as
the tested value is truncated, so if the lower part looks like one
of cases, but upper part is garbage, we get false possitives.
Ugh, that's probably correct.
I believe you will need to emit also code like
case xyz:
if (val != xyz)
break;
to get proper behaviour.
Hmm... perhaps it's not worth it then. This needs some thought. HOST_WIDE_INT
isn't equal to int on a lot of machine and it would be a shame to lose the
switch on all of them.