From patchwork Tue Nov 28 15:38:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezra Sitorus X-Patchwork-Id: 170852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp4015252vqx; Tue, 28 Nov 2023 07:38:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGt8gXUDMg+7ANBTEcUQP+eKEbdEZX7sm6fer4KbE+X7RosU/aL+Jfd+DPbXnVU2AxtTCw1 X-Received: by 2002:a05:620a:2705:b0:77d:98a6:357c with SMTP id b5-20020a05620a270500b0077d98a6357cmr11269019qkp.0.1701185939077; Tue, 28 Nov 2023 07:38:59 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1701185939; cv=pass; d=google.com; s=arc-20160816; b=DWT88EUJFndvllpxgTzmghoMF9UvkNgpfx4DiqbxdDZks++u/y854ShyLFPWIrnqhs ZzHT6IWbhLZZLx26nTXrQFZBvjO4qKB/0bs08R7Gvni57JUqXTO1EATO+DQ/fz5kZLqw K94gHQmmAsZH81jXI9w1Jd2MQUg0/VkrYQd8WivkQ8rhKMjIUzBsBQAx9Exdum2Pkmw1 dGuK76qnE/0FNcvHpjXZaenHDMQFzonj4dlGq1Gn21SO/TKF7k/bt9h3RoLAur5KDVsL FhOqW6PahOYSs2+e1ggnZgMIPlemcw80pqJrGM98+nJDK4V+wwVWJAWwYdjoF+dO4mJ4 D0GA== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:nodisclaimer :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=HTbbMkvBR0AGJJ6xA1Mrty2jmCVj9CRi6g/Tp4owJJc=; fh=cdLUSjbFO0/cTi+z3xcckFOOtvTDyNZWtn2WcodW9fw=; b=CXLsWuM5Ar1qasix0Btb3Y6ZR534BNFjfLPvWUfp2a5nHIAfvmSxDuFnIM1vReHiPT 6NxEsN+gN2Tl/g/twWeLQiEzTWpGW7a8WUM3kctfOJCtf4OHtVkymwcTw0KTLBvSn4Ax LWoimBhSMTkP2tKoUyCHoPPcwDYMoFsKdP452/corurVnuBQOTWILXC6lA2DP8TwUe11 OeiAjfrC+9WNSuaaPtghkxZukuBgQvnURzGPpOFSJxWIGB37+MgXPH2WlBX7BT66iV4D BjkLfVoYBVdoIOJUSDBJEeUbLCVPEsOAG0F9QuP03KY070KS+FPLFZFfzUzf04FuxHbV sxtw== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=RNIjaLPI; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=RNIjaLPI; arc=pass (i=3); 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id pz12-20020a05620a640c00b0076dac93a764si12155081qkn.379.2023.11.28.07.38.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 07:38:59 -0800 (PST) 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=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=RNIjaLPI; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=RNIjaLPI; arc=pass (i=3); 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CFE8D3875DC0 for ; Tue, 28 Nov 2023 15:38:58 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2081.outbound.protection.outlook.com [40.107.7.81]) by sourceware.org (Postfix) with ESMTPS id A2B053858C54 for ; Tue, 28 Nov 2023 15:38:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A2B053858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A2B053858C54 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.7.81 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1701185913; cv=pass; b=RDfZi59YfbxA91iFqTTLDQFOEB1xMDKY0YJMs7xIJxFC0afv+D9U4tFiNvywHHsoSwhkK0ro6Xh0xrpX1UwYAT6PXjDL2OWFemFE6uB3v8CbM+kUImg5fTGypCN5whCAINyM6HLhpAkH+PsvzoJiiJS43BwrHtLXIV6rwf4o9IQ= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1701185913; c=relaxed/simple; bh=aOM0iMPhbvPAB5Ml8BRSJ3iF366XW9FIgWPBmQCmv5o=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=IEdZ4EwQ83B5DNjD5X4Qw1sXIvmSrMWlMlQgS3DbSVIfoU0FkCOqtbNU6uj/v+5NQVtys6qSrq7AMthD3kzK8msGYO+78mE3MJMxoUg4Geo6z0LEvHU0DRog8CY289+dYk3KJEygzBwzMXWEoyDkcfor03wxUWMjaKtBu9oGAyA= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=ZKXhadoZvza4Ta2ZBgPdMyTT6IEixYDtdexpb0M7uj48WwO1HFlUc4VgS8rSTlFiwlXZelMOydyxYaFXR1ocNUYZGTW1xhCcB6uscdamO0/LbDyFTlX5RthuoezaVXEL5mRkZ0jW5DRJLkJwZt5xzpOLa/f7x1m/eEhzF4fqnaUFCZPZcMKHAMfW3yYxXgrG4d4Rtdbmv7KeiqCMA5swLG7HPFKj1iumj1O24Mp2fQLcuyjrZebP3IeroYJN8VPyK280YSLEY6cX8Wtrko6XKNIsibmGZj7usny5UyWYd9/248OQ+CAIjwphFuXDKUboK975a14pXm+LXcPccs4JGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HTbbMkvBR0AGJJ6xA1Mrty2jmCVj9CRi6g/Tp4owJJc=; b=YlaEvp2yWEADgh5TJqvXJspOLnnouq1ztAbWMfz/7UlIpXYGhy//lq5YOf32XoxZdyEBz1hyT21nHtDut+wj1JoAWxSPgT+n4HeLZZrCWvIhwPt74sKmLthAcMxqIfarSjj37OKKmAvlSHpzwyeAI5Q80he5sEBWlMVJI0hAwFopeWP0OslBMWDWNTZQpQWIt6YkUPVXUs5v3UjfeoLdhATE6xHpDz2AklI2YB99Z9LlqwBrJdsBmiPVL6fWSYkEb7x3oBMCnqH4hOkfQPL4/asXt0y4Y0PR7F4K5cT5r1DIc5aYTF2vK+Ss2QcEt800qFjup/SvxbdiFmXhOH9pUw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HTbbMkvBR0AGJJ6xA1Mrty2jmCVj9CRi6g/Tp4owJJc=; b=RNIjaLPIVBpuN0LkzhxCWG+jdyJoT+7jEQ3zkKwkeuUblPO7wwZiLBroFdCIUDhK+3fDgyEJnlc5jmJbyI+xZijnjr8f+u7bRa9RKMKXIG9YFwYG5/E6/1kELcswweX9uoWjPNMGknoOBZ+QrzRkA8U5YjGgnjZ7iEQ1uEdHmyU= Received: from DUZPR01CA0261.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b9::19) by PR3PR08MB5612.eurprd08.prod.outlook.com (2603:10a6:102:8f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.27; Tue, 28 Nov 2023 15:38:28 +0000 Received: from DB1PEPF0003922F.eurprd03.prod.outlook.com (2603:10a6:10:4b9:cafe::c7) by DUZPR01CA0261.outlook.office365.com (2603:10a6:10:4b9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.22 via Frontend Transport; Tue, 28 Nov 2023 15:38:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB1PEPF0003922F.mail.protection.outlook.com (10.167.8.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.17 via Frontend Transport; Tue, 28 Nov 2023 15:38:28 +0000 Received: ("Tessian outbound 8289ea11ec17:v228"); Tue, 28 Nov 2023 15:38:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4901a6768ad0cb0f X-CR-MTA-TID: 64aa7808 Received: from 8206a0ad659a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 38D636D7-B764-4762-A8E9-04494D9F6B64.1; Tue, 28 Nov 2023 15:38:22 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8206a0ad659a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 28 Nov 2023 15:38:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YTiSlM4g/ARlIvuhqXZUKCg2y9uhquvUTLXsVmUUggwhlCmVmu0b4TBOWxwXUFWRLES41bAN5KmUJZOspS3cgwJJMxSGshSeXLQlX0nhpu8HOe6N2gv2RGip2D3CVkRXgo+vAh+IZH2SbvvVZaREqpo+BiTXJ9mARR8PSxgg3QnRk3OwvNrtjPWWQPouVRAaOapydAo9ScBj0finvqHs+eWPa9DynuYDfyYGm2nkx77gt29o5a0oLVeIVqckperU7ATXk4WqGyXMPHCTmXnvy+ars8vrLGrDxUlU3sx5j+wwTQOUrRlSou/tSfO7GJsRnJFw3PfQxu22HS0E+UytWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HTbbMkvBR0AGJJ6xA1Mrty2jmCVj9CRi6g/Tp4owJJc=; b=kHwOzQTXCtg2eaA8P94utdXa84p1JUaosx1UoJErWtvsfqKXf9tgbRxvVuhZHxHc+wCBlBymaeDjcjFXwlfqXqKLrM9z7nKf+1kPWA7IZ3CqKFhWY2yN5ZsiMPjvwkWw5aEoZyMnQzmPjz1lTkPyoDf8rNZrdozCvXZSBQPpoOzKaoplkjnuWQM2RYeRF6D71LK7nqRxZZFloqjvARVbMEcXI89VaF+Nt9Xq0dOcr4t2Yr31nx79MR7TEu9fR0LAZS2eSWxuaez/ANljffH5JYlhdX94/G+pr5I2kj6GKzEKL7WN5IA1u8v4LVm5QPo8FkFtDFI/zienIt0VFO+gvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HTbbMkvBR0AGJJ6xA1Mrty2jmCVj9CRi6g/Tp4owJJc=; b=RNIjaLPIVBpuN0LkzhxCWG+jdyJoT+7jEQ3zkKwkeuUblPO7wwZiLBroFdCIUDhK+3fDgyEJnlc5jmJbyI+xZijnjr8f+u7bRa9RKMKXIG9YFwYG5/E6/1kELcswweX9uoWjPNMGknoOBZ+QrzRkA8U5YjGgnjZ7iEQ1uEdHmyU= Received: from AM6P194CA0072.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::49) by VI1PR08MB10103.eurprd08.prod.outlook.com (2603:10a6:800:1ce::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.27; Tue, 28 Nov 2023 15:38:19 +0000 Received: from AM2PEPF0001C708.eurprd05.prod.outlook.com (2603:10a6:209:84:cafe::48) by AM6P194CA0072.outlook.office365.com (2603:10a6:209:84::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29 via Frontend Transport; Tue, 28 Nov 2023 15:38:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM2PEPF0001C708.mail.protection.outlook.com (10.167.16.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7046.17 via Frontend Transport; Tue, 28 Nov 2023 15:38:18 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 28 Nov 2023 15:38:14 +0000 Received: from e127754.arm.com (10.57.82.91) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Tue, 28 Nov 2023 15:38:14 +0000 From: To: CC: , Subject: [PATCH] [GCC] match.pd: Simplify rule for bitwise not with casts Date: Tue, 28 Nov 2023 15:38:12 +0000 Message-ID: <20231128153812.4787-1-Ezra.Sitorus@arm.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM2PEPF0001C708:EE_|VI1PR08MB10103:EE_|DB1PEPF0003922F:EE_|PR3PR08MB5612:EE_ X-MS-Office365-Filtering-Correlation-Id: be3de302-052d-4cbe-869a-08dbf028117b x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wM8thlkqHzqziSTXmyym9gXwV/ImmA8QU+Ayq1D5+CqA8HjpJ90Ndwoa3SqYXsZRZ0NnBYvP98RzMDs6JNVOM4qMK0sgCRdNiiQEiJYJ74U35wUa6LyCKdsy14oW/bO8FQ0X/NRmPj5vmfw9Oq5knrpSOjJKFG4A8uA59YqHdsrP/Jj8OY+mqpq0VdXj7qfRV7wUyvTE5ZaYME1Yu343eq+4mmjOXB4ZWafgUcHyxlIpwNP0qf1cTRozFEXUez+utxZY/tcA/R6e2GKuNTGTdlUAiP2MLegK336ZD8Wl5/eM4DI4T2BVcsnc72jy/Sfwn3kUIzlIsEdp0aIuPrJJg2h6Jzpk+rU3f0YTFrgweQUuMB0ZU632rtQd/bFkIssxtpaZNqzAYGPFbupHauuM7jfFyCb+6nLYuQ7G3sH6IAX0bo5LzPWWXxd3P4fdJURnrm4Z08ZBkG38V+d+iDGTBlxlnSDMZxEczmZSRTHPCbpprqfVS8NvoQ2UgCj84E1sWATKoOQ9kM3l0DSXCEQmg1bvsMMQ17ErDBAXtTohJbLbf1COsp+vlg/oto2YxslNOU0nNkiQiNbprXrpHwUz9VKH7WRpdZMVsa5hjVGpsmGl4rcs8bnpsYvAq03hbhaj80hv6OJC0Ls36/bUh/LwWDZ3sWaqjN/u/FNjlH/R2SiFOmKC8KqBV3fAgF7cpXAwVotKzLZCxLAy54pK03Z6c1mMBvXBn1ieiMW6RsRPv7h9W0ASGAHfjsdIb6TBYdrB X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(39850400004)(346002)(136003)(376002)(396003)(230922051799003)(451199024)(1800799012)(82310400011)(186009)(64100799003)(36840700001)(46966006)(81166007)(40480700001)(47076005)(356005)(336012)(82740400003)(426003)(7696005)(5660300002)(4326008)(8936002)(316002)(6916009)(70586007)(70206006)(36860700001)(8676002)(54906003)(478600001)(86362001)(41300700001)(2906002)(36756003)(2876002)(1076003)(26005)(2616005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10103 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF0003922F.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 25725da6-a03a-4176-e6e2-08dbf0280ba6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qk1reDgfmsWwEkOkgK1pRS+/5fwMfNt5kMy9gRDCQpC3xSy/6nhLtGhiRhLGw93bbycFh8LdpyIIFZJY81ROxHUiNkHIhwCuX1gzW6+iuu/GL7+rcvX1hGhJs2mxgWy4zf5vEXBXlm/wVSvhKhpoF37eREUnYKKoLZ8PH5dxHLjHY544wiNqvBb1+VyYnfpdCmP5bFIBmd5xPw0GlQ2LVlY8Agz3AuTebhxljiY1u9G7jT6kO7FI8rgy525dYJK/u5f88GIv9bTUmP/pRQkzF2uaAbemPya+0GlbiPpS6vhQJnzBQtL2l7WZmIOKBGb6bSHzWPHZvV4c65BItKdJU8cYEob+AqhDxdbkvIxVUqkhUmzkSmpY+ZdX38N0exsnKgbdeaEsRg34Z0vvdBcggOfNyd5ZYgKyOcn0/TmpHT20of1WQmJUP1kYHKb7pivjv6xsa+sYfawCTalmtHm9HeQ535ztfgD8TPv8Q8SzlJ5aVHu5fqqTHja4zRGS7Uoilyi0KZ4T0II7x6LmSvYZPJ0KQHBoevyCh6R8ddU5ga35lr6T6GM11IgiMgC2HHMdygVVeZk/LXeyV4jLWfATrg4rrullFeLmIDmQcjc3HzMEGyNkWp6re4nJV4k4m9nPqsK1UQJIyFjy6Pf3Jh2wzgfZLGYv0OoB63O+lU/HULaJHhJJpJCcrFfgT9qKhiX6vRRbdzUUB4ohWPgc4TCxe5VLQ7qdEDHzX+xW0Q5BfphCysFnB9fK3QguHG9aQy4i X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(136003)(39860400002)(376002)(396003)(230922051799003)(451199024)(1800799012)(82310400011)(186009)(64100799003)(36840700001)(46966006)(40470700004)(81166007)(40480700001)(47076005)(336012)(82740400003)(426003)(7696005)(5660300002)(4326008)(8936002)(316002)(6916009)(70586007)(70206006)(36860700001)(8676002)(54906003)(478600001)(86362001)(41300700001)(2906002)(36756003)(2876002)(1076003)(26005)(2616005)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2023 15:38:28.5723 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: be3de302-052d-4cbe-869a-08dbf028117b X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF0003922F.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5612 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783822747493215450 X-GMAIL-MSGID: 1783822747493215450 From: Ezra Sitorus Add the transform rule (T)(~A) -> ~(T)(A) for view_convert. The simplified result could be a single assembly instruction when chained with other instructions. gcc/ChangeLog: * match.pd: Add new transform rule. * testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpretq_vmvnq.c: Add new test * testsuite/gcc.target/arm/simd/vreinterpretq_vmvnq_1.c: Add new test --- gcc/match.pd | 5 ++++ .../advsimd-intrinsics/vreinterpretq_vmvnq.c | 25 ++++++++++++++++++ .../arm/simd/vreinterpretq_vmvnq_1.c | 26 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpretq_vmvnq.c create mode 100644 gcc/testsuite/gcc.target/arm/simd/vreinterpretq_vmvnq_1.c diff --git a/gcc/match.pd b/gcc/match.pd index 95225e4ca5f..273230a7681 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3576,6 +3576,11 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) && !TYPE_OVERFLOW_SANITIZED (type)) (convert (op! @0 @1))))) +/* (T)(~A) -> ~(T)A */ + (simplify + (view_convert (bit_not @0)) + (bit_not (view_convert @0))) + /* ~A + A -> -1 */ (simplify (plus:c (convert? (bit_not @0)) (convert? @0)) diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpretq_vmvnq.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpretq_vmvnq.c new file mode 100644 index 00000000000..ed82c844bd4 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpretq_vmvnq.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +#include + +int64x2_t test_vector1(int32x4_t a, int32x4_t b) +{ + return vandq_s64(vreinterpretq_s64_s32(vmvnq_s32(a)), + vreinterpretq_s64_s32(b)); +} + +int64x2_t test_vector2(int32x4_t a, int16x8_t b) +{ + return vandq_s64(vreinterpretq_s64_s32(vmvnq_s32(a)), + vreinterpretq_s64_s16(b)); +} + +int64x2_t test_vector3(int32x4_t a, int64x2_t b) +{ + return vandq_s64(vreinterpretq_s64_s32(vmvnq_s32(a)), b); +} + +/* { dg-final { scan-assembler-times {\tbic\t} 3 } } */ +/* { dg-final { scan-assembler-not {\tand\t} } } */ +/* { dg-final { scan-assembler-not {\tmvn\t} } } */ diff --git a/gcc/testsuite/gcc.target/arm/simd/vreinterpretq_vmvnq_1.c b/gcc/testsuite/gcc.target/arm/simd/vreinterpretq_vmvnq_1.c new file mode 100644 index 00000000000..a34425100ea --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/simd/vreinterpretq_vmvnq_1.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-additional-options "-march=armv8.2-a -mfloat-abi=hard -mfpu=neon" } */ + +#include + +int64x2_t test_vector1(int32x4_t a, int32x4_t b) +{ + return vandq_s64(vreinterpretq_s64_s32(vmvnq_s32(a)), + vreinterpretq_s64_s32(b)); +} + +int64x2_t test_vector2(int32x4_t a, int16x8_t b) +{ + return vandq_s64(vreinterpretq_s64_s32(vmvnq_s32(a)), + vreinterpretq_s64_s16(b)); +} + +int64x2_t test_vector3(int32x4_t a, int64x2_t b) +{ + return vandq_s64(vreinterpretq_s64_s32(vmvnq_s32(a)), b); +} + +/* { dg-final { scan-assembler-times {\tvbic\t} 3 } } */ +/* { dg-final { scan-assembler-not {\tvand\t} } } */ +/* { dg-final { scan-assembler-not {\tvmvn\t} } } */