* Marek Polacek:

> On Tue, Sep 27, 2016 at 08:58:59PM +0200, Florian Weimer wrote:
>> * Marek Polacek:
>> 
>> > @@ -11498,21 +11508,23 @@
>> >          case V64QImode:
>> >          case V32HImode:
>> >            if (TARGET_AVX512F)
>> > -          {
>> > -            tmp = "p<logic>";
>> > -            ssesuffix = "q";
>> > -            break;
>> > -          }
>> > +      {
>> > +        tmp = "p<logic>";
>> > +        ssesuffix = "q";
>> > +        break;
>> > +      }
>> > +    /* FALLTHRU */
>> >          case V32QImode:
>> >          case V16HImode:
>> >          case V16QImode:
>> >          case V8HImode:
>> >            if (TARGET_AVX512VL || TARGET_AVX2 || TARGET_SSE2)
>> > -          {
>> > -            tmp = "p<logic>";
>> > -            ssesuffix = TARGET_AVX512VL ? "q" : "";
>> > -            break;
>> > -          }
>> > +      {
>> > +        tmp = "p<logic>";
>> > +        ssesuffix = TARGET_AVX512VL ? "q" : "";
>> > +        break;
>> > +      }
>> > +    /* FALLTHRU */
>> >          default:
>> >            gcc_unreachable ();
>> >        }
>> 
>> Why isn't this a bug?  Wouldn't we want to reach gcc_unreachable ()
>> if, for example !TARGET_AVX512F and TARGET_SSE2?
>
> ?? In that case the FALLTHRU should be there if it's intentional that
> we may fall through to default.  Otherwise not sure what you mean.

Not sure if I read this code correctly, but if we fall through from
V32HImode, and we have TARGET_SSE2 set, we execute this code:

      tmp = "p<logic>";
      ssesuffix = TARGET_AVX512VL ? "q" : "";

And not gcc_unreachable (), as is probably intended.

Reply via email to