From patchwork Thu Feb 23 08:50:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 60849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp207654wrd; Thu, 23 Feb 2023 00:54:31 -0800 (PST) X-Google-Smtp-Source: AK7set+XCRQFVw59te6tn0jUEIF/c/+1ZhO6NFXREJOCLBsOXJ9n+IziRGNIGUZS/ecM7q1w+LpO X-Received: by 2002:a17:907:212c:b0:878:5bce:291a with SMTP id qo12-20020a170907212c00b008785bce291amr18880597ejb.36.1677142471006; Thu, 23 Feb 2023 00:54:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677142470; cv=none; d=google.com; s=arc-20160816; b=CQ3eqsyHBiM8GLRtCB3Be4HZeqMR+EFhnYUiYocCX2clydZm0WcsvQHjC1rlQioDi4 vvzJMj3fxg7rCp9wN1xgoxV6j+bX9c4W4jh/wv8fRJpkmmb4RUA1/lnI+rwBWqeoL4W9 4x4OGKhMHWNo6F3WHcW0MjL6PSAFQNnaSxtTmIfKio4YqRRLHbWIJ4rE+iFTJYYxVsi0 azarc8llGDOMYNO2MDeOBtnNeoUx60aURyrCG39v2RwVOFVWtl6R+wGQ+gcBM9eu2BRl fTBeuEtv4+21QRjo0lhEIV818YhpIps2nGciepcmeoD+o0L3XzXZAMAMW1uwOWAoIklO kjdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :organization:message-id:date:subject:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=/FeU75QsEhejLEPqgjmnaNydYE4yqqb0pjbKDZ/A2Yo=; b=YcnLyk/dU7BPHZr7V7tRJivoNIfQlZM6fXP74pU+N4r3Sfn+jvrNHHjMGi6sbb7YB/ y2jwObUyzCD9ouwNFh54HgNayX7oU4je0LzUrNCb6KhIJuBBeHPeY2jo31W4UuFxmVbq I2+oEKw89sONIlznU2BE5+dZYV+3sNVv8rPn/yRxniwLgqq0b0qSPEcSer6BYuyBMboA tZBpQ9mVpOef16OPN5lsHZH6yZUoqkdXWFvn/7Zqe26Dh6N80gCBzCE4gl02oK9s21hS fa4fUQV8EyOg54BgizP/MvvZPgF2Q7VW65RuXfpz4xWqKhoe9PIdHVHuIRAoMgKwWmHy NIsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=q2rmfSE1; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id k2-20020aa7c382000000b004ab1747b80fsi11167996edq.246.2023.02.23.00.54.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 00:54:30 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=q2rmfSE1; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AAE19385020E for ; Thu, 23 Feb 2023 08:52:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAE19385020E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677142354; bh=/FeU75QsEhejLEPqgjmnaNydYE4yqqb0pjbKDZ/A2Yo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=q2rmfSE1y+pUApLs3Dmk+GdephCBPO3wx6t8YGJTEX/XwILZVEYvZqv/DVQGwOd33 MqbSjDroNzjvOJ0vYTGP6HsWW9w2J59peCi3YPSqKPe4Vn7rtxps/eOWhBX9XMgXYt vYCuMqVv62wHQf5a+uY00/eCE8QmuYS0S6/TMLvw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout2.gsi.de (lxmtout2.gsi.de [140.181.3.112]) by sourceware.org (Postfix) with ESMTPS id 33DB23858C5E; Thu, 23 Feb 2023 08:50:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33DB23858C5E Received: from localhost (localhost [127.0.0.1]) by lxmtout2.gsi.de (Postfix) with ESMTP id 6C0D6203E7E8; Thu, 23 Feb 2023 09:50:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout2.gsi.de Received: from lxmtout2.gsi.de ([127.0.0.1]) by localhost (lxmtout2.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ufBP9Z3zhfJs; Thu, 23 Feb 2023 09:50:44 +0100 (CET) Received: from srvEX6.campus.gsi.de (unknown [10.10.4.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lxmtout2.gsi.de (Postfix) with ESMTPS id 3D1612038F83; Thu, 23 Feb 2023 09:50:44 +0100 (CET) Received: from minbar.localnet (140.181.3.12) by srvEX6.campus.gsi.de (10.10.4.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Thu, 23 Feb 2023 09:50:43 +0100 To: , Subject: [PATCH 7/8] libstdc++: Fix -Wsign-compare issue Date: Thu, 23 Feb 2023 09:50:10 +0100 Message-ID: <838576767.0ifERbkFSE@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research In-Reply-To: <2218250.iZASKD2KPV@minbar> References: <2218250.iZASKD2KPV@minbar> MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvEX7.Campus.gsi.de (10.10.4.97) To srvEX6.campus.gsi.de (10.10.4.96) X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Matthias Kretz via Gcc-patches From: Matthias Kretz Reply-To: Matthias Kretz Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758611343778310854?= X-GMAIL-MSGID: =?utf-8?q?1758611343778310854?= Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_builtin.h (_S_set): Compare as int. The actual range of these indexes is very small. --- libstdc++-v3/include/experimental/bits/simd_builtin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de stdₓ::simd ────────────────────────────────────────────────────────────────────────── diff --git a/libstdc++-v3/include/experimental/bits/simd_builtin.h b/libstdc++-v3/include/experimental/bits/simd_builtin.h index 0e75f941288..30bbfa7d478 100644 --- a/libstdc++-v3/include/experimental/bits/simd_builtin.h +++ b/libstdc++-v3/include/experimental/bits/simd_builtin.h @@ -2875,7 +2875,7 @@ _S_bit_xor(const _SimdWrapper<_Tp, _Np>& __x, const _SimdWrapper<_Tp, _Np>& __y) __k = __generate_from_n_evaluations<_Np, __vector_type_t<_Tp, _Np>>( [&](auto __j) _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { - if (__i == __j) + if (__i == static_cast(__j)) return _Tp(-__x); else return __k[+__j];