From patchwork Wed Jun 7 21:28:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 104708 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp492890vqr; Wed, 7 Jun 2023 14:29:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7WnxC+SNU/urrlPcXgL41jJFFgWWBuCXyGnvbEIsU9YNoXZ14dA9Bi64qXwFveWK+Q13/q X-Received: by 2002:a17:906:6a28:b0:973:92d4:9f4e with SMTP id qw40-20020a1709066a2800b0097392d49f4emr7580495ejc.53.1686173380553; Wed, 07 Jun 2023 14:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686173380; cv=none; d=google.com; s=arc-20160816; b=icnFh6IlERKreiRb2nufW5SHzJjWp4BBWyzBKRYTCMWR+kRfIo4M0KAFwGZbjSnkc2 Sc2y3GQyjWBD/nmUOtL1WObC2qpiqsI8RePVfSrS8xwiyPHAPS+O2D+7+ecThfcSV35D iBVyROH2k5UM3NIsPnurpKXTe6xp5xxf7PpNS+mgxzg+Lpac7dwioZ65WvL5gq1ErY8k WYeyw59laWtnphjQa+KoPepSVJHASYNlDNz1TXreLqpaYpqiPDzguNdpXNycf6/UNOkp Zx9PgaL/g/ZRtmRy6VwrrhCxCwBbzdoTsVE4J3q7XS382Kb9Xmj44l++pcgxlyXu3Hsw a0ew== 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:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=YhrKyij6puLA1nxlPzu4lwCn4PvDidByZJ0A51ps+9I=; b=YAkKY52hrZM3TDKDqR/RSzXRJsmbPw4ML2QWkVa/p8gOuPagwTBJUhX9nIG4LvX8/J kQjOd+AxscHclknWN1941MJdCXjxYSGyzWc3cEqWSGMyd3I8hatDrMMwPRiY7Zs46LJd RIxUyqu00rsGEAIJuFlEWeWgFzC07cnI7IZ3+IayZZBNv4P/3bFVCwMoRt6jJ+Z/iar4 ru1ZtWzie9nhCF+HZPZobjKM+C8SOXXFpLn20mrGSQpRdZIe+pbxqfyCphUyZl0O9lkq XQuftCnp44g3kXKc2ue8TSwsc8kJQrM7M7apuRO3mNHu2HVF2FdgbKWU0dd6M7+Q85zB a19g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="sBHf/dyQ"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id u11-20020a50eacb000000b005162f248dffsi8603814edp.451.2023.06.07.14.29.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 14:29:40 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="sBHf/dyQ"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 5901D3857011 for ; Wed, 7 Jun 2023 21:29:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5901D3857011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686173379; bh=YhrKyij6puLA1nxlPzu4lwCn4PvDidByZJ0A51ps+9I=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=sBHf/dyQTMouFxT4WeSOKOw0ySE5ucO7tF4i7NjaacnImU/mB4ccW1C6SuoM14xVW HKN5LZtidy2+Vd3lv8jX853Ytpf1O9p31/AlEGMUiTaiPeU6zhpN/+xMBfPY6tmez5 ErYg1QNZ5GrHNcrGjsuiabS3EYuTq/kT2qXazY9E= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by sourceware.org (Postfix) with ESMTPS id D33073858C1F for ; Wed, 7 Jun 2023 21:28:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D33073858C1F Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 357JrmCr017414 for ; Wed, 7 Jun 2023 14:28:57 -0700 Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3r30eu082k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 07 Jun 2023 14:28:57 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 7 Jun 2023 14:28:55 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 7 Jun 2023 14:28:55 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.76.242.112]) by maili.marvell.com (Postfix) with ESMTP id B24713F708C; Wed, 7 Jun 2023 14:28:50 -0700 (PDT) To: CC: Andrew Pinski Subject: [PATCH] MATCH: Fix comment for `(zero_one ==/!= 0) ? y : z y` patterns Date: Wed, 7 Jun 2023 14:28:06 -0700 Message-ID: <20230607212806.3052446-1-apinski@marvell.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: fUOAVqTSiIxngtlbJaOV6DZLhCaOjNsk X-Proofpoint-GUID: fUOAVqTSiIxngtlbJaOV6DZLhCaOjNsk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-07_11,2023-06-07_01,2023-05-22_02 X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, PLING_QUERY, RCVD_IN_DNSWL_LOW, 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 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: Andrew Pinski via Gcc-patches From: Andrew Pinski Reply-To: Andrew Pinski 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?1768080938375434934?= X-GMAIL-MSGID: =?utf-8?q?1768080938375434934?= The patterns match more than just `a & 1` so change the comment for these two patterns to say that. Committed as obvious after a bootstrap/test on x86_64-linux-gnu. gcc/ChangeLog: * match.pd: Fix comment for the `(zero_one ==/!= 0) ? y : z y` patterns. --- gcc/match.pd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/match.pd b/gcc/match.pd index dc36927cd0f..8f3d99239ce 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3688,7 +3688,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (cond (le @0 integer_zerop@1) (negate@2 @0) integer_zerop@1) (max @2 @1)) -/* ((x & 0x1) == 0) ? y : z y -> (-(typeof(y))(x & 0x1) & z) y */ +/* (zero_one == 0) ? y : z y -> (-(typeof(y))zero_one & z) y */ (for op (bit_xor bit_ior) (simplify (cond (eq zero_one_valued_p@0 @@ -3700,7 +3700,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) && (INTEGRAL_TYPE_P (TREE_TYPE (@0)))) (op (bit_and (negate (convert:type @0)) @2) @1)))) -/* ((x & 0x1) == 0) ? z y : y -> (-(typeof(y))(x & 0x1) & z) y */ +/* (zero_one != 0) ? z y : y -> (-(typeof(y))zero_one & z) y */ (for op (bit_xor bit_ior) (simplify (cond (ne zero_one_valued_p@0