https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66885

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to David Binderman from comment #2)
> (In reply to Andreas Schwab from comment #1)
> > The second condition is *not* always false.
> 
> After some further thought, agreed.
> 
> Would this be more clearly coded as
> 
>    switch (bytes % 4)
>    {
>    case 1:
>    case 3:
>        max = 16;
>        break;
>    case 2:
>        max = 32;
>        break;
>    case 0:
>        max = 64;
>        break;
>    }
> 
> or maybe even faster, some table lookup.

If we use a switch, GCC can convert it into a lookup table.  But it might be
faster with if anyways.

Reply via email to