Message ID | 20230512093855.79529-1-christophe.lyon@arm.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp4968622vqo; Fri, 12 May 2023 02:40:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Hr+X7CYOpOK0cKov6HR/FDeyZ4b4NkS/yL3WrSiC2BxAv3U0/MAci/Rtc3EDzu6m28tMc X-Received: by 2002:a17:907:70d:b0:948:eed:b4e0 with SMTP id xb13-20020a170907070d00b009480eedb4e0mr22385051ejb.61.1683884449697; Fri, 12 May 2023 02:40:49 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i22-20020aa7c9d6000000b00509ee597a3fsi6180888edt.92.2023.05.12.02.40.49 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 02:40:49 -0700 (PDT) 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=jM2UtjYX; arc=fail (signature failed); 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 7347A385354B for <ouuuleilei@gmail.com>; Fri, 12 May 2023 09:40:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7347A385354B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683884401; bh=x0hts4wa3H/q3lbcFqUhLVeTc5hcKl4XDJwBDI1D/F8=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=jM2UtjYX/R0rHjsqfMAkqh4V6AjoexQ/UgCraWIom6MH1sJQ1E7Xmxrqf4ZaJusFw q7kdNqXOJtOXYk/bwL2lIWLx7rzh2gsOZ+sQapAtHqXbbEFd0lHJkz69cui8Nfbdst 8bDdjVKXkrBHjaauhtJ1CX9Dnmc561t0cuX2PFIw= 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-he1eur04on2053.outbound.protection.outlook.com [40.107.7.53]) by sourceware.org (Postfix) with ESMTPS id 2C2583858C5F for <gcc-patches@gcc.gnu.org>; Fri, 12 May 2023 09:39:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C2583858C5F Received: from DU2PR04CA0216.eurprd04.prod.outlook.com (2603:10a6:10:2b1::11) by AS2PR08MB8976.eurprd08.prod.outlook.com (2603:10a6:20b:5fd::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.21; Fri, 12 May 2023 09:39:04 +0000 Received: from DBAEUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b1:cafe::c3) by DU2PR04CA0216.outlook.office365.com (2603:10a6:10:2b1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.23 via Frontend Transport; Fri, 12 May 2023 09:39:04 +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 DBAEUR03FT064.mail.protection.outlook.com (100.127.143.3) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.24 via Frontend Transport; Fri, 12 May 2023 09:39:04 +0000 Received: ("Tessian outbound 945aec65ec65:v136"); Fri, 12 May 2023 09:39:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 96de7b75dbcc2a89 X-CR-MTA-TID: 64aa7808 Received: from 96018289d52e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5EE37A26-E906-4614-B4E1-01EF4DA4C957.1; Fri, 12 May 2023 09:38:58 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 96018289d52e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 May 2023 09:38:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eDlaQ2FcbLCcHwTZVmVPc4hIuQWGvx0YPnSgQFlDTvsK3g9+3PcbyB4IHp37jMTzRLouC0mqTex4O0jG/tvuh5G//S3bW17lFQUDwBlw1/UW+WM4L3R91WBPPxAMps0PnB46jXU7xgrPGznJuV0nGqFk/RVurukoyR1eYcY103KSvnTTyR0UOPg0WZK8yv7zMF8up5ppc/LlC706ZmFjSqPVBM8sryrp2qZZSRV3M8TDJu+1MSyHdbtqKjhMb+fgifwUZlDC2mSdA5uwoKhGUpwWmpVaLTyergkmazhaVz0xOjOghIo0wCNoJP/tSOdQfuQGUW/yCWdixVPjJK5giA== 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=x0hts4wa3H/q3lbcFqUhLVeTc5hcKl4XDJwBDI1D/F8=; b=OavpE0lPYkvmOBjdPTLmDwywOiTBVTTY7CM2fEKDWWbIJPTdQs4O1BWdjBbXi4+VQ/uZAcOE5++mUzAdZfUXA8Fwbn/I4RdHatBncke1u4yYHac/7G4M7jjJb3Yl74ZbkIl/UtzXRWbRJd5lwUxYiZrgX04ts+2K1GqRwpqeGh9PAaO6n4ghRWyyy11WckV7B2p514owQauXzteaaSU5TFqICGwi9e01Rsj9X42q5/5je46EQ3e2q1CH2iltVFv1zu6YAUpeIRUBuDO8kX6KRIAdyGGBjwl0DOJ/c2Wtt24d6LN4rNzkfokAyfgy8b4OjdX3q3PGmEEzpB7yufOkKw== 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 Received: from AS8PR04CA0026.eurprd04.prod.outlook.com (2603:10a6:20b:310::31) by DU0PR08MB9901.eurprd08.prod.outlook.com (2603:10a6:10:479::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.23; Fri, 12 May 2023 09:38:56 +0000 Received: from AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:310:cafe::ae) by AS8PR04CA0026.outlook.office365.com (2603:10a6:20b:310::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.24 via Frontend Transport; Fri, 12 May 2023 09:38:56 +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 AM7EUR03FT037.mail.protection.outlook.com (100.127.140.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6387.23 via Frontend Transport; Fri, 12 May 2023 09:38:56 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) 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.23; Fri, 12 May 2023 09:38:55 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 12 May 2023 09:38:55 +0000 Received: from e129018.arm.com (10.57.21.161) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Fri, 12 May 2023 09:38:55 +0000 To: <gcc-patches@gcc.gnu.org>, <kyrylo.tkachov@arm.com>, <richard.earnshaw@arm.com>, <richard.sandiford@arm.com> CC: Christophe Lyon <christophe.lyon@arm.com> Subject: [PATCH 01/26] arm: [MVE intrinsics] add binary_widen_opt_n shape Date: Fri, 12 May 2023 11:38:30 +0200 Message-ID: <20230512093855.79529-1-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT037:EE_|DU0PR08MB9901:EE_|DBAEUR03FT064:EE_|AS2PR08MB8976:EE_ X-MS-Office365-Filtering-Correlation-Id: 51c21e31-1e6f-4813-88c1-08db52ccb9bc 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: SDozMgpg8ImYgfmJYJRusl+jFKfe0+XmZkWZhRE2/uNKkMJo6uw4WLW4r6lN+HFllDB3gtEIbu3juDMrqiuPEO9pMClprpiz1D2n/DwvKH//QwbBO57Tp80FMhF7l/Ej1b9GtCFet0p8mC8diAgmeQlUlGQ9urti3sOmienGHtSM/K12A0qEKBp+XjbC2KeYSiA0lMnrfr844gfF8RYcJGN1Mb7x1O9OMtZbGO5BMkRuGy7iGcJlpwhYFtxgtv/e75Uc3pcwDffOMwbpsPlfNVY7VkyyBSojdlFqEZST6Dto9/+q5XTgMlGjc25xmUyWic2fYpLAu52yDEOcs8MoHDyXETKb2qwYZC/413/nwZrjWn0PH8HVACzwypUlq6W2kiG17dCZ3mIQK6D1WeJmASBrtBKxKSPEJ5N9+bG17DikHJJg88w2KEZh25TInnLxElo+M51fB8DuqItnzksq2QRP0dk4fY2YJGzx1JdTBiNACBI95Tp32N1wSy8rA4z69Pusn6YduyE9NddouFLeDsdOnrj5NJJydc2WUOxEXcz8EtMBVKOjN7Q03kfmFJFUjrcgSl0ixrikIH4dHyfVMXI/gjGSp1fAhfRgIu7cn4LHxsIFFQ2BvW8WaEVnqw6mMVyg3FftoZNQcm2Pm+y5KGeWmflWm/MiErLHFM/Pmnd8K1/I7p1r8NTefnGxYJAwEXXO0+iDAQG7QRD6gVI5gmhfNAhfTfN3vA2ioQ3q4LDo4PkZCDrc0B1KMB0SDBLa 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:(13230028)(4636009)(346002)(396003)(39860400002)(136003)(376002)(451199021)(46966006)(36840700001)(356005)(81166007)(82740400003)(40480700001)(36756003)(86362001)(82310400005)(5660300002)(44832011)(8936002)(8676002)(26005)(1076003)(186003)(4001150100001)(2906002)(70206006)(2616005)(70586007)(478600001)(110136005)(6666004)(6636002)(4326008)(316002)(41300700001)(7696005)(36860700001)(47076005)(336012)(426003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9901 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ae2f448f-2d9a-4115-be0d-08db52ccb4a5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QOP/xfi1ZONKIaeUHt6bBgXxvxz+9gOjwfMzQf8zQx3Y+2yNo8ko3shub59e164+qzY0vXQLTIwxMMHeU+ah/hqy6Pnu/pt0K6hrPYWmjb2UNhcjaACswNFXc6V+6z0X0BFblWhHjQ+/ndZKGblsQg0pdteE33O5tVPQzc7ULYfCkooW2siDDO5jVAhq6ktBLTyYuk4Gkqs2fXa3pL44NOMkpf+iDltHr+pg+AITiHcdf/Lh3ff54FPeKlGmSn2p4R6gvrb+eZqWdjCLMK+kqD8XtHY+g77BJrBm+MtURXGeOMyVpNYFEjRXdI0kdMF5pOcobsc21Ayny8fOjmXVYr4/2h0RWIZU4Q5M9dth8+I3AE4UcuSEJ2tn2WYxtgHslcbQHV1dU1l0whv1RSEGJN//a0kZtHxBf9mXw0juPfxnrf1Q7IOTlbnsXrWWtptvGjjUETcXUNW48H6E9LUQCMA64d+iMIjxoFCYXmZ0siqDoD0oebDypWcIjAA/FeqaUi8D1RUQCsRg60CYKvhGIAU2ogPlkctG7LIBH/TyRmT/ySppEAedAWhxB7Mzph4tmeNs3alG0NfLLo+CfdFnRICggk7ZhTYMHJT3jbcYVG46BnTdZ/6toE/L4WYXtipDCwADeM0PSwLzhJmsA05cdzlUTSS4A2NUzzXaWU/KEIKDc4e5GF+LxgHrxKfN6BvTRuovCS7pjB1sfZpQfyUc1nXQ/1Qyu5A92+et0q9Y8pG5WwRn46j8rHm4JIR/M09o 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:(13230028)(4636009)(376002)(136003)(396003)(39860400002)(346002)(451199021)(36840700001)(40470700004)(46966006)(82740400003)(82310400005)(86362001)(81166007)(36756003)(40460700003)(7696005)(4326008)(6636002)(316002)(41300700001)(5660300002)(4001150100001)(186003)(8936002)(1076003)(8676002)(44832011)(26005)(40480700001)(336012)(2906002)(70206006)(2616005)(47076005)(426003)(70586007)(478600001)(110136005)(6666004)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 09:39:04.5847 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51c21e31-1e6f-4813-88c1-08db52ccb9bc 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: DBAEUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8976 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Christophe Lyon via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Christophe Lyon <christophe.lyon@arm.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765680820298891259?= X-GMAIL-MSGID: =?utf-8?q?1765680820298891259?= |
Series |
[01/26] arm: [MVE intrinsics] add binary_widen_opt_n shape
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Christophe Lyon
May 12, 2023, 9:38 a.m. UTC
This patch adds the binary_widen_opt_n shape description. 2022-12-12 Christophe Lyon <christophe.lyon@arm.com> gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_widen_opt_n): New. * config/arm/arm-mve-builtins-shapes.h (binary_widen_opt_n): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 49 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 50 insertions(+)
Comments
> -----Original Message----- > From: Christophe Lyon <christophe.lyon@arm.com> > Sent: Friday, May 12, 2023 10:39 AM > To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>; > Richard Earnshaw <Richard.Earnshaw@arm.com>; Richard Sandiford > <Richard.Sandiford@arm.com> > Cc: Christophe Lyon <Christophe.Lyon@arm.com> > Subject: [PATCH 01/26] arm: [MVE intrinsics] add binary_widen_opt_n shape > > This patch adds the binary_widen_opt_n shape description. This series is ok with one style nit fixed in this first patch... > > 2022-12-12 Christophe Lyon <christophe.lyon@arm.com> > > gcc/ > * config/arm/arm-mve-builtins-shapes.cc (binary_widen_opt_n): > New. > * config/arm/arm-mve-builtins-shapes.h (binary_widen_opt_n): New. > --- > gcc/config/arm/arm-mve-builtins-shapes.cc | 49 +++++++++++++++++++++++ > gcc/config/arm/arm-mve-builtins-shapes.h | 1 + > 2 files changed, 50 insertions(+) > > diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm- > mve-builtins-shapes.cc > index 5a299a272f5..ee4bc3f8ea4 100644 > --- a/gcc/config/arm/arm-mve-builtins-shapes.cc > +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc > @@ -1098,6 +1098,55 @@ struct binary_widen_n_def : public > overloaded_base<0> > }; > SHAPE (binary_widen_n) > > +/* <T0:twice>_t vfoo[_t0](<T0>_t, <T0>_t) > + <T0:twice>_t vfoo[_n_t0](<T0>_t, <S0>_t) > + > + Example: vqdmullbq. > + int32x4_t [__arm_]vqdmulltq[_n_s16](int16x8_t a, int16_t b) > + int32x4_t [__arm_]vqdmulltq_m[_n_s16](int32x4_t inactive, int16x8_t a, > int16_t b, mve_pred16_t p) > + int32x4_t [__arm_]vqdmulltq[_s16](int16x8_t a, int16x8_t b) > + int32x4_t [__arm_]vqdmulltq_m[_s16](int32x4_t inactive, int16x8_t a, > int16x8_t b, mve_pred16_t p) */ > +struct binary_widen_opt_n_def : public overloaded_base<0> > +{ > + void > + build (function_builder &b, const function_group_info &group, > + bool preserve_user_namespace) const override > + { > + b.add_overloaded_functions (group, MODE_none, > preserve_user_namespace); > + build_all (b, "vw0,v0,v0", group, MODE_none, > preserve_user_namespace); > + build_all (b, "vw0,v0,s0", group, MODE_n, preserve_user_namespace); > + } > + > + tree > + resolve (function_resolver &r) const override > + { > + unsigned int i, nargs; > + type_suffix_index type; > + if (!r.check_gp_argument (2, i, nargs) > + || (type = r.infer_vector_type (i - 1)) == NUM_TYPE_SUFFIXES) > + return error_mark_node; > + > + type_suffix_index wide_suffix > + = find_type_suffix (type_suffixes[type].tclass, > + type_suffixes[type].element_bits * 2); > + > + /* Skip last argument, may be scalar, will be checked below by > + finish_opt_n_resolution. */ > + unsigned int last_arg = i--; > + for (; i > 0; i--) > + if (!r.require_matching_vector_type (i, type)) > + return error_mark_node; > + > + /* Check the inactive argument has the wide type. */ > + if ((r.pred == PRED_m) > + && (r.infer_vector_type (0) != wide_suffix)) > + return r.report_no_such_form (type); Indentation is off here I think. Thanks, Kyrill > + > + return r.finish_opt_n_resolution (last_arg, 0, type); > + } > +}; > +SHAPE (binary_widen_opt_n) > + > /* Shape for comparison operations that operate on > uniform types. > > diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm- > mve-builtins-shapes.h > index a28cd6a1547..07b12b4af68 100644 > --- a/gcc/config/arm/arm-mve-builtins-shapes.h > +++ b/gcc/config/arm/arm-mve-builtins-shapes.h > @@ -53,6 +53,7 @@ namespace arm_mve > extern const function_shape *const binary_rshift_narrow; > extern const function_shape *const binary_rshift_narrow_unsigned; > extern const function_shape *const binary_widen_n; > + extern const function_shape *const binary_widen_opt_n; > extern const function_shape *const cmp; > extern const function_shape *const create; > extern const function_shape *const inherent; > -- > 2.34.1
On 5/12/23 12:17, Kyrylo Tkachov wrote: > > >> -----Original Message----- >> From: Christophe Lyon <christophe.lyon@arm.com> >> Sent: Friday, May 12, 2023 10:39 AM >> To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>; >> Richard Earnshaw <Richard.Earnshaw@arm.com>; Richard Sandiford >> <Richard.Sandiford@arm.com> >> Cc: Christophe Lyon <Christophe.Lyon@arm.com> >> Subject: [PATCH 01/26] arm: [MVE intrinsics] add binary_widen_opt_n shape >> >> This patch adds the binary_widen_opt_n shape description. > > This series is ok with one style nit fixed in this first patch... > >> >> 2022-12-12 Christophe Lyon <christophe.lyon@arm.com> >> >> gcc/ >> * config/arm/arm-mve-builtins-shapes.cc (binary_widen_opt_n): >> New. >> * config/arm/arm-mve-builtins-shapes.h (binary_widen_opt_n): New. >> --- >> gcc/config/arm/arm-mve-builtins-shapes.cc | 49 +++++++++++++++++++++++ >> gcc/config/arm/arm-mve-builtins-shapes.h | 1 + >> 2 files changed, 50 insertions(+) >> >> diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm- >> mve-builtins-shapes.cc >> index 5a299a272f5..ee4bc3f8ea4 100644 >> --- a/gcc/config/arm/arm-mve-builtins-shapes.cc >> +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc >> @@ -1098,6 +1098,55 @@ struct binary_widen_n_def : public >> overloaded_base<0> >> }; >> SHAPE (binary_widen_n) >> >> +/* <T0:twice>_t vfoo[_t0](<T0>_t, <T0>_t) >> + <T0:twice>_t vfoo[_n_t0](<T0>_t, <S0>_t) >> + >> + Example: vqdmullbq. >> + int32x4_t [__arm_]vqdmulltq[_n_s16](int16x8_t a, int16_t b) >> + int32x4_t [__arm_]vqdmulltq_m[_n_s16](int32x4_t inactive, int16x8_t a, >> int16_t b, mve_pred16_t p) >> + int32x4_t [__arm_]vqdmulltq[_s16](int16x8_t a, int16x8_t b) >> + int32x4_t [__arm_]vqdmulltq_m[_s16](int32x4_t inactive, int16x8_t a, >> int16x8_t b, mve_pred16_t p) */ >> +struct binary_widen_opt_n_def : public overloaded_base<0> >> +{ >> + void >> + build (function_builder &b, const function_group_info &group, >> + bool preserve_user_namespace) const override >> + { >> + b.add_overloaded_functions (group, MODE_none, >> preserve_user_namespace); >> + build_all (b, "vw0,v0,v0", group, MODE_none, >> preserve_user_namespace); >> + build_all (b, "vw0,v0,s0", group, MODE_n, preserve_user_namespace); >> + } >> + >> + tree >> + resolve (function_resolver &r) const override >> + { >> + unsigned int i, nargs; >> + type_suffix_index type; >> + if (!r.check_gp_argument (2, i, nargs) >> + || (type = r.infer_vector_type (i - 1)) == NUM_TYPE_SUFFIXES) >> + return error_mark_node; >> + >> + type_suffix_index wide_suffix >> + = find_type_suffix (type_suffixes[type].tclass, >> + type_suffixes[type].element_bits * 2); >> + >> + /* Skip last argument, may be scalar, will be checked below by >> + finish_opt_n_resolution. */ >> + unsigned int last_arg = i--; >> + for (; i > 0; i--) >> + if (!r.require_matching_vector_type (i, type)) >> + return error_mark_node; >> + >> + /* Check the inactive argument has the wide type. */ >> + if ((r.pred == PRED_m) >> + && (r.infer_vector_type (0) != wide_suffix)) >> + return r.report_no_such_form (type); > > Indentation is off here I think. Indeed! Thanks, Christophe > Thanks, > Kyrill > >> + >> + return r.finish_opt_n_resolution (last_arg, 0, type); >> + } >> +}; >> +SHAPE (binary_widen_opt_n) >> + >> /* Shape for comparison operations that operate on >> uniform types. >> >> diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm- >> mve-builtins-shapes.h >> index a28cd6a1547..07b12b4af68 100644 >> --- a/gcc/config/arm/arm-mve-builtins-shapes.h >> +++ b/gcc/config/arm/arm-mve-builtins-shapes.h >> @@ -53,6 +53,7 @@ namespace arm_mve >> extern const function_shape *const binary_rshift_narrow; >> extern const function_shape *const binary_rshift_narrow_unsigned; >> extern const function_shape *const binary_widen_n; >> + extern const function_shape *const binary_widen_opt_n; >> extern const function_shape *const cmp; >> extern const function_shape *const create; >> extern const function_shape *const inherent; >> -- >> 2.34.1 >
diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index 5a299a272f5..ee4bc3f8ea4 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -1098,6 +1098,55 @@ struct binary_widen_n_def : public overloaded_base<0> }; SHAPE (binary_widen_n) +/* <T0:twice>_t vfoo[_t0](<T0>_t, <T0>_t) + <T0:twice>_t vfoo[_n_t0](<T0>_t, <S0>_t) + + Example: vqdmullbq. + int32x4_t [__arm_]vqdmulltq[_n_s16](int16x8_t a, int16_t b) + int32x4_t [__arm_]vqdmulltq_m[_n_s16](int32x4_t inactive, int16x8_t a, int16_t b, mve_pred16_t p) + int32x4_t [__arm_]vqdmulltq[_s16](int16x8_t a, int16x8_t b) + int32x4_t [__arm_]vqdmulltq_m[_s16](int32x4_t inactive, int16x8_t a, int16x8_t b, mve_pred16_t p) */ +struct binary_widen_opt_n_def : public overloaded_base<0> +{ + void + build (function_builder &b, const function_group_info &group, + bool preserve_user_namespace) const override + { + b.add_overloaded_functions (group, MODE_none, preserve_user_namespace); + build_all (b, "vw0,v0,v0", group, MODE_none, preserve_user_namespace); + build_all (b, "vw0,v0,s0", group, MODE_n, preserve_user_namespace); + } + + tree + resolve (function_resolver &r) const override + { + unsigned int i, nargs; + type_suffix_index type; + if (!r.check_gp_argument (2, i, nargs) + || (type = r.infer_vector_type (i - 1)) == NUM_TYPE_SUFFIXES) + return error_mark_node; + + type_suffix_index wide_suffix + = find_type_suffix (type_suffixes[type].tclass, + type_suffixes[type].element_bits * 2); + + /* Skip last argument, may be scalar, will be checked below by + finish_opt_n_resolution. */ + unsigned int last_arg = i--; + for (; i > 0; i--) + if (!r.require_matching_vector_type (i, type)) + return error_mark_node; + + /* Check the inactive argument has the wide type. */ + if ((r.pred == PRED_m) + && (r.infer_vector_type (0) != wide_suffix)) + return r.report_no_such_form (type); + + return r.finish_opt_n_resolution (last_arg, 0, type); + } +}; +SHAPE (binary_widen_opt_n) + /* Shape for comparison operations that operate on uniform types. diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index a28cd6a1547..07b12b4af68 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -53,6 +53,7 @@ namespace arm_mve extern const function_shape *const binary_rshift_narrow; extern const function_shape *const binary_rshift_narrow_unsigned; extern const function_shape *const binary_widen_n; + extern const function_shape *const binary_widen_opt_n; extern const function_shape *const cmp; extern const function_shape *const create; extern const function_shape *const inherent;