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]

Re: genrecog.c tweak


    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.


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