From patchwork Thu May 11 12:19:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 92520 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp4330346vqo; Thu, 11 May 2023 05:29:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CKABDW3ILq4YWnpME7tGcvLdZkukVgVe9E9W4BLfqOvfB0qNrxrg3ekkxZW5+9ReK6P8k X-Received: by 2002:a17:907:6d10:b0:965:fb87:4215 with SMTP id sa16-20020a1709076d1000b00965fb874215mr17795135ejc.15.1683808176360; Thu, 11 May 2023 05:29:36 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id oy1-20020a170907104100b00965f82f6f7asi5398053ejb.293.2023.05.11.05.29.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 05:29:36 -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=yj9FBu2Z; 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 2D71D38983B4 for ; Thu, 11 May 2023 12:23:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D71D38983B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683807825; bh=XKanBSuyf6kBXu0cachAtCiEkohrLJ6Gi0obMOsn8BY=; h=To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=yj9FBu2Z2JmHm9NO3xapJ3qvbQJC4mrbYqssy4O7epgeif1ZVmIhncgXIbBmSMwu6 JYfYWA7Ds/uO/bXlf3XVoxBJeNp1AE/SMdMUnd4FyEUBIfnuMtgNX8Bz7qgakDiJzy PJQksPSUde1W6bamAzWaYY34Rfmc4Pag72sub8lo= 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-he1eur04on2045.outbound.protection.outlook.com [40.107.7.45]) by sourceware.org (Postfix) with ESMTPS id EE0CF38560B4 for ; Thu, 11 May 2023 12:19:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE0CF38560B4 Received: from AM7PR02CA0012.eurprd02.prod.outlook.com (2603:10a6:20b:100::22) by GVXPR08MB7679.eurprd08.prod.outlook.com (2603:10a6:150:6f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.32; Thu, 11 May 2023 12:19:44 +0000 Received: from AM7EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::b3) by AM7PR02CA0012.outlook.office365.com (2603:10a6:20b:100::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.21 via Frontend Transport; Thu, 11 May 2023 12:19:43 +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 AM7EUR03FT006.mail.protection.outlook.com (100.127.141.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.22 via Frontend Transport; Thu, 11 May 2023 12:19:43 +0000 Received: ("Tessian outbound 8b05220b4215:v136"); Thu, 11 May 2023 12:19:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 14c87f35e23dfec6 X-CR-MTA-TID: 64aa7808 Received: from 994ce12105f8.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8F127CD0-932C-40E8-890B-F1E01B9A3F97.1; Thu, 11 May 2023 12:19:37 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 994ce12105f8.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 11 May 2023 12:19:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xpwhb3Z3jDpPaJl3iq7/xxBU7fdG02eIDrCCmn2EN7xtwTfeMWvqIDCfIiiL51XB/liqOnN3uHkD1CE6vzBPFMHzUT5tb3/7ZY/wPl9rjAaR0iaCjKE0B4ea3CTpVvTRkJgkwY2qP3fh8/Au6yS12I3VLRgGR+zZKhL2RGKmL50dxPSGoLdKJXGt75LCNSf8tf86/pUB4iyMbdQ+oaYYJyH1Fu25KNa7lUsReol/rHHo6onzxzZ5m/aoiJ/MOlvyXR/p0rMw8PKN0B1t9YYUoUBk1W25ER9fFWq9Wnv7XYWc8Q6Q6IZm1baFUNhw1QW/8+QZ6PLZdabilsWAFZH0Dw== 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=XKanBSuyf6kBXu0cachAtCiEkohrLJ6Gi0obMOsn8BY=; b=gSclYCK1xCwEsw2oB/92w+KhcjW3FqJZf7YGRZIlmFWSnvTRA7BrhWXbmhFsj4rcirvtc3BYeInwUO9tFNHdHnNCaZrzhbpNZhlnEfjD/Azxqc8GCuWnWvJPBIb5Uj/9WjxmL+HGRfyet5GCuKP/TVmirCMr4Psh78a77r4Ktj7G1YFyqGyKNL2v/PT78Rtu/7jWyU4ww703fUZRIsTHWwDO7fg3xfLVbDDtQ+S6hQuuTLDPAjXCEGKtOTlR/eQSmILTDH6ChUuV2WiQMdySkvavaQ7VlW5StQDo3z+gp0Fw9d4Cda2zK3Gj/yVDugoEllzyWwV3ZC4+ocQPVD2cnQ== 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 AS9PR06CA0017.eurprd06.prod.outlook.com (2603:10a6:20b:462::13) by PAXPR08MB7419.eurprd08.prod.outlook.com (2603:10a6:102:2ba::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Thu, 11 May 2023 12:19:31 +0000 Received: from AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:462:cafe::a7) by AS9PR06CA0017.outlook.office365.com (2603:10a6:20b:462::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.22 via Frontend Transport; Thu, 11 May 2023 12:19:31 +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 AM7EUR03FT005.mail.protection.outlook.com (100.127.140.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6387.22 via Frontend Transport; Thu, 11 May 2023 12:19:31 +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.23; Thu, 11 May 2023 12:19:29 +0000 Received: from e129018.arm.com (10.57.23.121) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Thu, 11 May 2023 12:19:28 +0000 To: , , , CC: Christophe Lyon Subject: [PATCH 22/24] arm: [MVE intrinsics] add ternary_n shape Date: Thu, 11 May 2023 14:19:17 +0200 Message-ID: <20230511121919.16923-22-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230511121919.16923-1-christophe.lyon@arm.com> References: <20230511121919.16923-1-christophe.lyon@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT005:EE_|PAXPR08MB7419:EE_|AM7EUR03FT006:EE_|GVXPR08MB7679:EE_ X-MS-Office365-Filtering-Correlation-Id: 551bb1e3-30c6-4bb3-3e65-08db521a00ba 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: YsOQh2wg3x+DKOYm0KRuINHJ3BYo8NV4sk7qVX7uVL77kYuL1kGvxiHkS2Ni4AO66X+OY0Dpx3Dhl6NIwmZ6JzXwrizg2NP3bI2l2kRrH0fSmr5B+SiZS4WcE9gWGJoBr2kOQfydUUF+EvLmo1c64SPPQa/XdxhoA1ju0+Q2hQ4CDtjnDZ4BYq0ebIkiLBSLC8+fETxJfelANnHcFc+GEZSyGrr6S177BhQEugCHXjXp2KEDkYzxd2GM5+kEdTCq4bCZhhYk0oCtL5NFd3FfBOZCywScM6ps1QyOG3DhsnO3ruH3ztPk4pDQcsGdxZiHk69D3aWtVpp/yi7l3dpHRp5qANOzUTxpzgh050D0KFHBiqLxAxM8+LRGml3aMGBtwxK1QSgqRIsEH3MLBGT2U54BccV574CNSPE4+U9FQHhPkdVeUItEqQc/67LI/41Qgx9m8FN7Nsv7G6yLLNiUOT3DdsSFmkIKeDmX3oZO4e7+C5d90W7yk+32tT5zgH017X6haLDbaCm8f9Uu8kOtGA47wa8uu5Qh2tlhfp69MfXzQRE1JCXifZWoD2B5DpyKKkektAB76FQwdUeILs7zgXpDuxw1DIgT3Kl3Oehd97ZgL6UPUHiwqYcfpweDxJIq64BvSJ9shGbCHJKCBT9W+0lGNzo+8Dh8Kn9WcUc6GB5lVV6nq/4PFHDI8NcaCgdfF6cYnqCRUYJQ3wL2TyIPSWpAkLxkHj9A/Rjtr1oxE6w= 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)(376002)(136003)(39860400002)(346002)(396003)(451199021)(46966006)(36840700001)(40470700004)(110136005)(70586007)(82310400005)(70206006)(86362001)(478600001)(316002)(41300700001)(6666004)(7696005)(36756003)(6636002)(5660300002)(8676002)(4326008)(8936002)(44832011)(81166007)(356005)(82740400003)(40460700003)(26005)(2906002)(36860700001)(1076003)(186003)(4001150100001)(336012)(426003)(47076005)(2616005)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7419 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 10fb9c16-4898-4253-9091-08db5219f929 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y99mqM2V3oRuMx0KkOmdwygii/ctkdu53kP+PVPwMkUyuS1BHAAOxe/hA5JQyNJd7I5tn7FLNMMATn8f/Csn1y3eWiI/4JN2JEsWWI0pr1dw+l4Dy7gzRX6KfInkWtUI0HIfDq7io49NUsiYJdUu/8Gp7JFeJtaTL2A3Tts9i0wsAcSIEdQW2L8E1KSOPb/a5aiZF8aljEm/RONT/2mIsa1GX+VpF52sWB1+HsFlmC8XTEPaExhKleDNFOeF3+tn7b6wIBtnTTbFgQEHlN1mSvY872etMaClxukoQnR8ibv5ZIvWXSadJz4zp3fkHglBC+eOE1qzKeAphzvTYBNOLOEno/OPRfVt3h3lamMtVy0erdgqeKRKNWHXgNRC5PoiyH07xfKrl9ixFiD3qrtj/y3hd1JmWzLTJFHtz7QnT9Z0OeA6TL4qnTXGXXCpn/FREJbBpD9oL1ntnDv9VcCNHI8uWmP0iz9ce7Q4euDLzb3qaNEWqCkzpK4ufngmvaAWtXhNL4oC+4A1aKmLUkn82kXbq/dMxri1oMWv98vb6/OwDBEJdNWCfAcl2nS7UKMOYRqGUszh1Ee5zigvzOi7mXFsTHqVKamCTQZ6b8Fgpri1yaDWhqzJ3c4wPO5ugqG2CQTQsfUGHGLDyoKb+WIDXxc3s94Der0vOmCrhMklnqNCJdmeKGTrrpU2zHjb3hKUwHKHS79W69788JsoE6D4QA== 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)(39860400002)(136003)(346002)(396003)(451199021)(46966006)(36840700001)(40470700004)(41300700001)(316002)(4001150100001)(8676002)(110136005)(478600001)(8936002)(44832011)(6666004)(2906002)(70586007)(6636002)(5660300002)(70206006)(4326008)(47076005)(26005)(1076003)(40480700001)(186003)(40460700003)(82740400003)(7696005)(2616005)(426003)(336012)(36860700001)(36756003)(82310400005)(81166007)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 12:19:43.7421 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 551bb1e3-30c6-4bb3-3e65-08db521a00ba 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: AM7EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7679 X-Spam-Status: No, score=-12.6 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Christophe Lyon via Gcc-patches From: Christophe Lyon Reply-To: Christophe Lyon 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?1765600842590961137?= X-GMAIL-MSGID: =?utf-8?q?1765600842590961137?= This patch adds the ternary_n shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (ternary_n): New. * config/arm/arm-mve-builtins-shapes.h (ternary_n): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 27 +++++++++++++++++++++++ gcc/config/arm/arm-mve-builtins-shapes.h | 1 + 2 files changed, 28 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index 4455a253579..5a299a272f5 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -1189,6 +1189,33 @@ struct ternary_def : public overloaded_base<0> }; SHAPE (ternary) +/* _t vfoo[_n_t0](_t, _t, _t) + + i.e. the standard shape for ternary operations that operate on a + pair of vectors of the same type as the destination, and take a + third scalar argument of the same type as the vector elements. + + Example: vmlaq. + int8x16_t [__arm_]vmlaq[_n_s8](int8x16_t add, int8x16_t m1, int8_t m2) + int8x16_t [__arm_]vmlaq_m[_n_s8](int8x16_t add, int8x16_t m1, int8_t m2, mve_pred16_t p) */ +struct ternary_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_n, preserve_user_namespace); + build_all (b, "v0,v0,v0,s0", group, MODE_n, preserve_user_namespace); + } + + tree + resolve (function_resolver &r) const override + { + return r.resolve_uniform (2, 1); + } +}; +SHAPE (ternary_n) + /* _t vfoo[_t0](_t) i.e. the standard shape for unary operations that operate on diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index b3ddd0a9e8d..a28cd6a1547 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -57,6 +57,7 @@ namespace arm_mve extern const function_shape *const create; extern const function_shape *const inherent; extern const function_shape *const ternary; + extern const function_shape *const ternary_n; extern const function_shape *const unary; extern const function_shape *const unary_acc; extern const function_shape *const unary_convert;