From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16836 invoked by alias); 27 Sep 2016 19:33:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16826 invoked by uid 89); 27 Sep 2016 19:33:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Sep 2016 19:33:42 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2DC2581243; Tue, 27 Sep 2016 19:33:41 +0000 (UTC) Received: from redhat.com (ovpn-204-20.brq.redhat.com [10.40.204.20]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8RJXbc6007846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Sep 2016 15:33:40 -0400 Date: Tue, 27 Sep 2016 19:39:00 -0000 From: Marek Polacek To: Florian Weimer Cc: GCC Patches , Richard Sandiford , Kyrylo Tkachov Subject: Re: PATCH to add more FALLTHRU markers Message-ID: <20160927193337.GK3223@redhat.com> References: <20160927164726.GG3223@redhat.com> <87bmz9xj7w.fsf@mid.deneb.enyo.de> <20160927191847.GJ3223@redhat.com> <874m51xhtl.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874m51xhtl.fsf@mid.deneb.enyo.de> User-Agent: Mutt/1.7.0 (2016-08-17) X-SW-Source: 2016-09/txt/msg02058.txt.bz2 On Tue, Sep 27, 2016 at 09:29:10PM +0200, Florian Weimer wrote: > * 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"; > >> > - ssesuffix = "q"; > >> > - break; > >> > - } > >> > + { > >> > + tmp = "p"; > >> > + ssesuffix = "q"; > >> > + break; > >> > + } > >> > + /* FALLTHRU */ > >> > case V32QImode: > >> > case V16HImode: > >> > case V16QImode: > >> > case V8HImode: > >> > if (TARGET_AVX512VL || TARGET_AVX2 || TARGET_SSE2) > >> > - { > >> > - tmp = "p"; > >> > - ssesuffix = TARGET_AVX512VL ? "q" : ""; > >> > - break; > >> > - } > >> > + { > >> > + tmp = "p"; > >> > + 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"; > ssesuffix = TARGET_AVX512VL ? "q" : ""; > > And not gcc_unreachable (), as is probably intended. Kyrill, can you please decide? Thanks. Marek