From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2075.outbound.protection.outlook.com [40.107.20.75]) by sourceware.org (Postfix) with ESMTPS id 06BE53856DC8 for ; Thu, 11 May 2023 08:24:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06BE53856DC8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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=tyq9r78gQWS7J0BqmMoBeS4/fEjm82At7zxzcIgqpNc=; b=2N/jaW/7vOyL8Y618z7PQFOQCsHv82wgyOqQ3wJR7LvhBJhnU8+VNuHCq7V5K9/1+p0zc/5YQFNas2XC7U7/zIMG9+Fzxo72i0upxLh98Zx1OePBBQzNxWBVG5F4CDe2N45KvzegyAB5qUJECkpdEJjPHMprDi43aUUNmb228n4= Received: from FR0P281CA0183.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ab::12) by DB9PR08MB8433.eurprd08.prod.outlook.com (2603:10a6:10:3d7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.19; Thu, 11 May 2023 08:24:30 +0000 Received: from VI1EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:d10:ab:cafe::fa) by FR0P281CA0183.outlook.office365.com (2603:10a6:d10:ab::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.6 via Frontend Transport; Thu, 11 May 2023 08:24:30 +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 VI1EUR03FT018.mail.protection.outlook.com (100.127.144.133) 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 08:24:30 +0000 Received: ("Tessian outbound 99a3040377ca:v136"); Thu, 11 May 2023 08:24:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b0cd1d924a438575 X-CR-MTA-TID: 64aa7808 Received: from 8fe837af2e39.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AA9468EE-1109-496D-8ED0-F4EE32853856.1; Thu, 11 May 2023 08:24:18 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8fe837af2e39.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 11 May 2023 08:24:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JgpLBL5S0MHPPKKZo0ccBME3vhmOyqVYkkoCB+DtZDr5qlE6wGLZIBX3nr1WrUIBlHw7S9/sa7eDQR6jKHJGfp8IdRM16x+1vOgkAXev6s58PcNhWZiaMVFK6cPo2kDFga0u/k3tiRsBVBUdotkgDyqTjyxpK/vKcMnr2flcAoEmy6/uJfWjCiyIakp5Lu5DI5E+KiAjekJOLCBkufYkP5Nnqzb/PlSFf+qDCtIMmPbaGSeCqMoLLrwBPX0G0WpCoywoIDJqvfuNJnHXC0H369jbHfhA4Zfbwz7y+ob2RhgizaQc4d07abwyzPQZDsd9pAOTQ8Ws5/OHzgWa8vgR/g== 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=tyq9r78gQWS7J0BqmMoBeS4/fEjm82At7zxzcIgqpNc=; b=T7hRs8JCbe195bK+fUXwK6JYDU4MHsoFd0qOv6ZDv9r+i+Bnyyj3+QIG/xF3gDzcUv9w2fz1Togb9suA1WEJFQ7cVJ/7Cikc4nTlGBXotr3B2c38P41vYc2e0nDDYLdOQwEQ+1jFZT4ZIKUjRX10oLdf4S8P0N+gX8Aa07evRxX5E4lgRA+aH8p1FqLJL4nEv/9yfus4VEFJ7QyFDWjHTgTezKlPEzMUcU1t8OonLzhVTWwdMey4yUrAx0t3RGSaM4KEtFCBY/dMBaEv1V4CpntKqRHMRXqOMjqU0b8HF6rbiihSY/vgTadDT0jb7j7vXGCBzWVWyRAuDmvCTYJufg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none 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=tyq9r78gQWS7J0BqmMoBeS4/fEjm82At7zxzcIgqpNc=; b=2N/jaW/7vOyL8Y618z7PQFOQCsHv82wgyOqQ3wJR7LvhBJhnU8+VNuHCq7V5K9/1+p0zc/5YQFNas2XC7U7/zIMG9+Fzxo72i0upxLh98Zx1OePBBQzNxWBVG5F4CDe2N45KvzegyAB5qUJECkpdEJjPHMprDi43aUUNmb228n4= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3390.eurprd08.prod.outlook.com (2603:10a6:803:7d::27) by DB9PR08MB8338.eurprd08.prod.outlook.com (2603:10a6:10:3dd::9) 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 08:24:16 +0000 Received: from VI1PR08MB3390.eurprd08.prod.outlook.com ([fe80::1a93:2d42:2bb5:eae9]) by VI1PR08MB3390.eurprd08.prod.outlook.com ([fe80::1a93:2d42:2bb5:eae9%2]) with mapi id 15.20.6363.033; Thu, 11 May 2023 08:24:16 +0000 Message-ID: <6be30dfa-ccd8-5b68-a796-a3db2a6584de@arm.com> Date: Thu, 11 May 2023 10:24:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 15/20] arm: [MVE intrinsics] add unary_acc shape Content-Language: en-US To: Kyrylo Tkachov , "gcc-patches@gcc.gnu.org" , Richard Earnshaw , Richard Sandiford References: <20230510133036.596530-1-christophe.lyon@arm.com> <20230510133036.596530-15-christophe.lyon@arm.com> From: Christophe Lyon In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0086.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::19) To VI1PR08MB3390.eurprd08.prod.outlook.com (2603:10a6:803:7d::27) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3390:EE_|DB9PR08MB8338:EE_|VI1EUR03FT018:EE_|DB9PR08MB8433:EE_ X-MS-Office365-Filtering-Correlation-Id: 17f5101d-2bef-4368-3b5c-08db51f9249b 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: Kyu7qPoAinkJK0+qA9NbvPB/cWurQWtavK3Hv/zSwsvuRsqVzbJHRV3U70n6v1//FAx623WWNEfJ7WPHK31WB111YBGcHsJU3MM1CT4WroaxI07aTnLfcE9sLcyGILbSmcxBdGb61ATSDIrKsnyg0pYx4BOtZKgqda24w4OoWAK7DFo4gBJV/9DBhqpt/93wPwu+QlOB3UtON6TH5dyDeDquSsVenjlCX39cFlSmdSwEjRD0g46TlXKy08IosAGU2P54hahmiCJri1MhyV2n+WsGbTdlwYiM1PuhH9ScdYnCu1sDEs71i2Ks8+AaYgeADTTW4v8tFHmMsqBVxoFw4CoenIkEq+DoNnXsZctyKj9E/m5FXkyI7fPW5E3SsOwNZjWrwpof38OXEcGZeuiZte1F9+NJZ5NT8FNdBZ3vHhZJHRQ9/7B9YKxsiKt/YsFDdVo8njoffLMfiBoq6PvI1miBm/aM+NIWxJCNTdQM56j5u4N0SgevierL6F6ADMWaJKNMOPOj6wPNDBbf2YnBuDJb6anlIZSAqYw1ufOd3IyZl079qYFkZsrJdvOSUVCd3keZgR7A8/OPW9IcM2gN3EZzvc4gKFzD8kBoVIHoqLwLFL4iu8SnK5+uJzaYp4G9CrAty90IAE77LhhvaB9fhQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3390.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(396003)(346002)(136003)(366004)(451199021)(6506007)(6512007)(26005)(53546011)(38100700002)(2906002)(4001150100001)(186003)(2616005)(36756003)(83380400001)(31686004)(6486002)(31696002)(966005)(8936002)(8676002)(6636002)(66476007)(66946007)(41300700001)(66556008)(6666004)(478600001)(316002)(5660300002)(86362001)(44832011)(110136005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8338 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VI1EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 55c45a1a-44b8-4b40-3dd9-08db51f91bc6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vz5KBbaCrxXE6PilMaaGQ0b+NCX7DFb1B442bSQNyhR/KBgijMCcC5XUQ8t58iZ3hlrWlk94F11MMk3fpN8ObXzbuq9qV5b6VxzAhVFc2oMKA0bjX979rS7KodDUIJ4JbwILCk9cDYO8LHoWodDFgPg09iikpNz2KBetJAggc1SIYKXqKriwC/6Ym18rJDbYx7liwHxZWzuCpRf61AT2A0yxupmygCQ6LLgPUqJo0ZgpxU7Qcc/L9A7R7Kf20+opfv8j4tbpZ1i7nlBQipfAHOXvTsfc7EmLzc81TquIz2d6laUGvwVQW51ee7elkizIzGfLhUg5wty2I6zacEZKUq/VFLy826JwPY9ieRd30KOxLSBgE2rpdlHc4r0z0IB03MTadBTBG/zWHNhGMTiby9/DjEKVNeBuY+mmQ5PDZsWFy2aJu3kaA5er/dZVYVtP66s/qwLgKuGGn0nbtguAkeD8RoWzShMBpbjg3JD5Lz4p8CB0rCDQ2IDBLxZh3+ZfxSEvxlghT/fMpg6eHdK51GR7TI/dchCMk7l2RoCJzbIRmbC9RIYDXu9TCYXr9rEFoRI0sWu4Z9qUpXhUyODs/HvO7TQBa8vHkIKSjClKO5xnpxlHc+zpoOoHe3rtZd3iHL+Pr4GLrGHuJ3TqYNDSI0p1DnoNf2Uf8GR4lyPhCs3y+TvJT1uxYNnDWEHgHP3hOFVvrgpwUV1ynZTVpVqjzx6CwNqLWo6IiGExFZF3po8gj2zMSaoNz0MtutZJez6u 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)(136003)(346002)(396003)(39860400002)(376002)(451199021)(36840700001)(40470700004)(46966006)(40460700003)(2906002)(336012)(53546011)(83380400001)(186003)(2616005)(4001150100001)(70206006)(41300700001)(6512007)(36860700001)(47076005)(70586007)(316002)(6666004)(6636002)(6486002)(110136005)(44832011)(26005)(6506007)(8936002)(8676002)(5660300002)(966005)(478600001)(40480700001)(81166007)(356005)(82740400003)(86362001)(31696002)(36756003)(82310400005)(31686004)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 08:24:30.4510 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17f5101d-2bef-4368-3b5c-08db51f9249b 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: VI1EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8433 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_SHORT,NICE_REPLY_A,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 List-Id: On 5/11/23 10:23, Kyrylo Tkachov wrote: > > >> -----Original Message----- >> From: Christophe Lyon >> Sent: Thursday, May 11, 2023 9:21 AM >> To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org; >> Richard Earnshaw ; Richard Sandiford >> >> Subject: Re: [PATCH 15/20] arm: [MVE intrinsics] add unary_acc shape >> >> >> >> On 5/10/23 16:52, Kyrylo Tkachov wrote: >>> >>> >>>> -----Original Message----- >>>> From: Christophe Lyon >>>> Sent: Wednesday, May 10, 2023 2:31 PM >>>> To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov ; >>>> Richard Earnshaw ; Richard Sandiford >>>> >>>> Cc: Christophe Lyon >>>> Subject: [PATCH 15/20] arm: [MVE intrinsics] add unary_acc shape >>>> >>>> This patch adds the unary_acc shape description. >>>> >>>> 2022-10-25 Christophe Lyon >>>> >>>> gcc/ >>>> * config/arm/arm-mve-builtins-shapes.cc (unary_acc): New. >>>> * config/arm/arm-mve-builtins-shapes.h (unary_acc): New. >>>> --- >>>> gcc/config/arm/arm-mve-builtins-shapes.cc | 28 >> +++++++++++++++++++++++ >>>> gcc/config/arm/arm-mve-builtins-shapes.h | 1 + >>>> 2 files changed, 29 insertions(+) >>>> >>>> diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc >> b/gcc/config/arm/arm- >>>> mve-builtins-shapes.cc >>>> index bff1c3e843b..e77a0cc20ac 100644 >>>> --- a/gcc/config/arm/arm-mve-builtins-shapes.cc >>>> +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc >>>> @@ -1066,6 +1066,34 @@ struct unary_def : public overloaded_base<0> >>>> }; >>>> SHAPE (unary) >>>> >>>> +/* _t vfoo[_](_t) >>>> + >>>> + i.e. a version of "unary" in which the source elements are half the >>>> + size of the destination scalar, but have the same type class. >>>> + >>>> + Example: vaddlvq. >>>> + int64_t [__arm_]vaddlvq[_s32](int32x4_t a) >>>> + int64_t [__arm_]vaddlvq_p[_s32](int32x4_t a, mve_pred16_t p) */ >>>> +struct unary_acc_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, "sw0,v0", group, MODE_none, >> preserve_user_namespace); >>>> + } >>>> + >>>> + tree >>>> + resolve (function_resolver &r) const override >>>> + { >>>> + /* FIXME: check that the return value is actually >>>> + twice as wide as arg 0. */ >>> >>> Any reason why we can't add that check now? >>> I'd rather not add new FIXMEs here... >> >> I understand :-) >> >> That's because the resolver only knows about the arguments, not the >> return value: >> /* The arguments to the overloaded function. */ >> vec &m_arglist; >> >> I kept this like what already exists for AArch64/SVE, but we'll need to >> extend it to handle return values too, so that we can support all >> overloaded forms of vuninitialized >> (see https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616003.html) >> >> I meant this extension to be a follow-up work when most intrinsics have >> been converted and the few remaining ones (eg. vuninitialized) needs an >> improved framework. And that would enable to fix the FIXME. > > Thanks for explaining. > The series is ok for trunk then. Great, thanks! > Kyrill > >> >> Thanks, >> >> Christophe >> >> >>> Thanks, >>> Kyrill >>> >>>> + return r.resolve_unary (); >>>> + } >>>> +}; >>>> +SHAPE (unary_acc) >>>> + >>>> /* _t foo_t0[_t1](_t) >>>> >>>> where the target type must be specified explicitly but the source >>>> diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h >> b/gcc/config/arm/arm- >>>> mve-builtins-shapes.h >>>> index fc1bacbd4da..c062fe624c4 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 create; >>>> extern const function_shape *const inherent; >>>> extern const function_shape *const unary; >>>> + extern const function_shape *const unary_acc; >>>> extern const function_shape *const unary_convert; >>>> extern const function_shape *const unary_int32; >>>> extern const function_shape *const unary_int32_acc; >>>> -- >>>> 2.34.1 >>>