From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 575833850432 for ; Wed, 31 Aug 2022 08:29:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 575833850432 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661934557; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=bmXfKPMYZbLnJpeJoycaZXWJPhMRwllNvMLti7ARRIg=; b=iO9cKYKES/+YmBm71pv9brXkE7XQ0D0/o46tL0vMEgVjdj+ffEqebOEe1XmoBVDQFVGwJw MSh2fpJUQUQcxLs/QSXzOsUXanc2Bsj4XraotE7cYesVSmnedB0fesQqUyIYMg30p1icvU ew9AgoMq6ZKrNfGHKnUQP/2qSn5LDws= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-493-QQUbwCyLOWyXUxc_UrooJw-1; Wed, 31 Aug 2022 04:29:13 -0400 X-MC-Unique: QQUbwCyLOWyXUxc_UrooJw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 634A08032FB; Wed, 31 Aug 2022 08:29:13 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 052E3909FF; Wed, 31 Aug 2022 08:29:12 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 27V8T9aO162868 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 10:29:10 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 27V8T7H1162867; Wed, 31 Aug 2022 10:29:07 +0200 Date: Wed, 31 Aug 2022 10:29:07 +0200 From: Jakub Jelinek To: Rainer Orth Cc: Andrew Stubbs , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 1/3] omp-simd-clone: Allow fixed-lane vectors Message-ID: Reply-To: Jakub Jelinek References: <290f72ce-e997-0a8c-f11b-cd64edb0859c@codesourcery.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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: On Tue, Aug 30, 2022 at 06:54:49PM +0200, Rainer Orth wrote: > > --- 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. It broke bootstrap for me on x86_64-linux and i686-linux too. I've bootstrapped/regtested the following patch on both overnight and committed to unbreak bootstrap for others. 2022-08-31 Rainer Orth Jakub Jelinek * omp-simd-clone.cc (simd_clone_adjust_return_type, simd_clone_adjust_argument_types): Use known_eq (veclen, 0U) instead of known_eq (veclen, 0) to avoid -Wsign-compare warnings. --- gcc/omp-simd-clone.cc.jj 2022-08-30 23:10:02.054456930 +0200 +++ gcc/omp-simd-clone.cc 2022-08-30 23:51:03.601664615 +0200 @@ -504,7 +504,7 @@ simd_clone_adjust_return_type (struct cg veclen = node->simdclone->vecsize_int; else veclen = node->simdclone->vecsize_float; - if (known_eq (veclen, 0)) + if (known_eq (veclen, 0U)) veclen = node->simdclone->simdlen; else veclen = exact_div (veclen, GET_MODE_BITSIZE (SCALAR_TYPE_MODE (t))); @@ -621,7 +621,7 @@ simd_clone_adjust_argument_types (struct veclen = sc->vecsize_int; else veclen = sc->vecsize_float; - if (known_eq (veclen, 0)) + if (known_eq (veclen, 0U)) veclen = sc->simdlen; else veclen @@ -676,7 +676,7 @@ simd_clone_adjust_argument_types (struct veclen = sc->vecsize_int; else veclen = sc->vecsize_float; - if (known_eq (veclen, 0)) + if (known_eq (veclen, 0U)) veclen = sc->simdlen; else veclen = exact_div (veclen, Jakub