From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id CC56438515FF for ; Wed, 31 Aug 2022 07:11:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC56438515FF Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CD22C221D2; Wed, 31 Aug 2022 07:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1661929915; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hKdNqQJHmyse6/v9PnWjoxT2eRpe8ew9EyBKu87cMsY=; b=RGVxuWmstZ9jHP3JtQKiw7bH40BWEF/zXWYxImrCoFBP6+SIdxzcKHTwTQxfsap3T7Icze olqsR0cL9p6O/smfp+DG+66C5silmnFiyeVfAZKa0gk99Ew5pnG3eP7sgqosDm3EBqB9s2 rM4Hz8ifl3hTxJCw5Mj2PSDHzBV9h3o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1661929915; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hKdNqQJHmyse6/v9PnWjoxT2eRpe8ew9EyBKu87cMsY=; b=LaTSZFefjQmJinSwxObNNhe3LGIbLr1m/FQjTe9mpmMgptBQybGqVRvsIgr+blT4PawtSV f052bLOkW3MA23DA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id AA9911332D; Wed, 31 Aug 2022 07:11:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5lDWILsJD2NZCAAAMHmgww (envelope-from ); Wed, 31 Aug 2022 07:11:55 +0000 Message-ID: <253d0cac-51b6-a1e2-89f2-b123d499e895@suse.cz> Date: Wed, 31 Aug 2022 09:11:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 1/3] omp-simd-clone: Allow fixed-lane vectors Content-Language: en-US To: Rainer Orth , Andrew Stubbs Cc: Jakub Jelinek , gcc-patches@gcc.gnu.org References: <290f72ce-e997-0a8c-f11b-cd64edb0859c@codesourcery.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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: On 8/30/22 18:54, Rainer Orth wrote: > 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; > | ~~~~~~~~~~~~^~~~ I noticed the very same warning on x86_64-linux-gnu as well. Cheers, Martin > > Changing the three instances of 0 to 0U seems to fix this. > > Rainer >