From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id E19D1382F0BE for ; Tue, 30 Aug 2022 16:54:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E19D1382F0BE Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id D8B5BB2BF8; Tue, 30 Aug 2022 18:54:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RpdHFZVxEBnF; Tue, 30 Aug 2022 18:54:50 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p5085519d.dip0.t-ipconnect.de [80.133.81.157]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 5FC31B2B4D; Tue, 30 Aug 2022 18:54:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1661878490; bh=7O83FKBBlhxB1hdab3/WjTGQuyNn4zGV8p6AlGVmV4A=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ar++jWknbsiwuhlgobFfnB2U5SPAH2ErgBB5HqdWqptYjMEhRYl/2qinfvXSENg/R vQ9PKfvP4mu+IIGlvebWiss9iMT9bWNoVB13l5eP7pb8bJwZV4HHX5JBFRG2LkV/gV bcLUcmVFNXqZaDRtrDiGnQCI9iynJXg54CS62PLE4epgowatifudD3y81V2kE/AsWh dZxIXWtG6R2awcRx9RaltuDdPPgNik6b5cXzpXlEV0c9hRgjfJXOk8HyIbyKXO0XWF JQviMuGQOp3q2TJq9eJ37ZHIPYM2NEv9yw2bwwq8zZheF18jdnogT3BffF78vKgDIQ MCKrg91CeYslQ== From: Rainer Orth To: Andrew Stubbs Cc: Jakub Jelinek , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 1/3] omp-simd-clone: Allow fixed-lane vectors References: <290f72ce-e997-0a8c-f11b-cd64edb0859c@codesourcery.com> Date: Tue, 30 Aug 2022 18:54:49 +0200 In-Reply-To: <290f72ce-e997-0a8c-f11b-cd64edb0859c@codesourcery.com> (Andrew Stubbs's message of "Tue, 30 Aug 2022 15:52:34 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3795.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Andrew, > On 26/08/2022 12:04, Jakub Jelinek wrote: >>> gcc/ChangeLog: >>> >>> * doc/tm.texi: Regenerate. >>> * omp-simd-clone.cc (simd_clone_adjust_return_type): Allow zero >>> vecsize. >>> (simd_clone_adjust_argument_types): Likewise. >>> * target.def (compute_vecsize_and_simdlen): Document the new >>> vecsize_int and vecsize_float semantics. >> LGTM, except for a formatting nit. > diff --git a/gcc/omp-simd-clone.cc b/gcc/omp-simd-clone.cc > index 58bd68b129b..68ee4c2c3b0 100644 > --- a/gcc/omp-simd-clone.cc > +++ b/gcc/omp-simd-clone.cc > @@ -504,7 +504,10 @@ simd_clone_adjust_return_type (struct cgraph_node *node) > veclen = node->simdclone->vecsize_int; > else > veclen = node->simdclone->vecsize_float; > - veclen = exact_div (veclen, GET_MODE_BITSIZE (SCALAR_TYPE_MODE (t))); > + if (known_eq (veclen, 0)) > + veclen = node->simdclone->simdlen; > + else > + veclen = exact_div (veclen, GET_MODE_BITSIZE (SCALAR_TYPE_MODE (t))); > if (multiple_p (veclen, node->simdclone->simdlen)) > veclen = node->simdclone->simdlen; > if (POINTER_TYPE_P (t)) this broke bootstrap on (at least) i386-pc-solaris2.11 and sparc-sun-solaris2.11: In file included from /vol/gcc/src/hg/master/local/gcc/coretypes.h:475, from /vol/gcc/src/hg/master/local/gcc/omp-simd-clone.cc:23: /vol/gcc/src/hg/master/local/gcc/poly-int.h: In instantiation of 'typename if_nonpoly::type maybe_ne(const poly_int_pod&, const Cb&) [with unsigned int N = 1; Ca = long long unsigned int; Cb = int; typename if_nonpoly::type = bool]': /vol/gcc/src/hg/master/local/gcc/omp-simd-clone.cc:507:7: required from here /vol/gcc/src/hg/master/local/gcc/poly-int.h:1295:22: error: comparison of integer expressions of different signedness: 'const long long unsigned int' and 'const int' [-Werror=sign-compare] 1295 | return a.coeffs[0] != b; | ~~~~~~~~~~~~^~~~ Changing the three instances of 0 to 0U seems to fix this. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University