From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) by sourceware.org (Postfix) with ESMTPS id 5DA59385414B for ; Fri, 5 May 2023 11:03:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5DA59385414B 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=3MYLPb2bqDJOTRfrYRxIoio9XvksrprA6KtjSoF8ntQ=; b=HY6JLmx79occrBlGbpRUK0jjUcWY0TxM3qcLaVbX+HsP2gApasPm1DIUiSVoP5kVTE05t9Zep8ylo6PnSCXJoY/AvClZbmUI4cGmsADlHdKO5rJUbohbvdCcjrhSz3wXKfhPRNGu3ELwVNKIF35DibfQ2Ymt3fNeNHJuksEKICw= Received: from AS9PR06CA0059.eurprd06.prod.outlook.com (2603:10a6:20b:463::34) by DU0PR08MB7921.eurprd08.prod.outlook.com (2603:10a6:10:3c8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27; Fri, 5 May 2023 11:03:20 +0000 Received: from AM7EUR03FT056.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:463:cafe::2b) by AS9PR06CA0059.outlook.office365.com (2603:10a6:20b:463::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27 via Frontend Transport; Fri, 5 May 2023 11:03:20 +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 AM7EUR03FT056.mail.protection.outlook.com (100.127.140.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27 via Frontend Transport; Fri, 5 May 2023 11:03:20 +0000 Received: ("Tessian outbound e13c2446394c:v136"); Fri, 05 May 2023 11:03:19 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 09f9672cb33ff3f3 X-CR-MTA-TID: 64aa7808 Received: from 873dbfed2951.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CF61A187-8F1A-4A8A-9CF9-173EEE44EA46.1; Fri, 05 May 2023 11:03:08 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 873dbfed2951.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 05 May 2023 11:03:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=boDu0jTv45SE6wbaUKYoxuHp+L10/YwN+OXEUcvoVtGmYn34XoTisbASJWc/aVhNsSEtThdi3hekjgPSZIKItukk5GxV4bxBbXpV8JBG5Mj7XuwwE7AVJqGTcBeQEXFX9WCWgpxHHBEZ6/qYaPPmUS156KZO7N11UPaAfKC2fZBaZ94zdPSh5UWDX/p3KVaCVkUraC+kBDUVhjCaJTVBGIkENwDscD2Eke5/sfAE3kyXnWtfB9hCZJINaU74jW0hGDcRVoRPtGe5X17kQLFrmFs0vCgMy/JJcIevreNCfs0h6bvqhnYRH3yEqzNfDXjob/uwH+3am7BG2T2K4jNJng== 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=3MYLPb2bqDJOTRfrYRxIoio9XvksrprA6KtjSoF8ntQ=; b=KJ8mZjFYsGRnfi0UPGyvnAraAD7dlV3JHK44A+EOM4AFRd2arPWNIZnIZbKDGDqYpjt2QcbjQikZBp4u7n7F7rbkK66454e7inN97LyL47zeyppbdhnZu3Q7WN6qfEj9m5JgpRTJIh9vJwxHdXzJTwr8rMNEQ8vcpiZSDVmBMJRBA2A+KxsrG1H1BJC/2dRu8H9Gt+mx6xnU7g7GfB2aQOKVe0gLxMBqYa81DdubHMFiu7ULrvXmPFXEKCFSt+P2ZUBmLYDJrVj9evP6Dii+dKgit8oQE7Xb8Zliu4xdvdJTaeTB991GMXFd8T6z3/ggdx4+AdeYUCWuNc7S3uKC3Q== 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=3MYLPb2bqDJOTRfrYRxIoio9XvksrprA6KtjSoF8ntQ=; b=HY6JLmx79occrBlGbpRUK0jjUcWY0TxM3qcLaVbX+HsP2gApasPm1DIUiSVoP5kVTE05t9Zep8ylo6PnSCXJoY/AvClZbmUI4cGmsADlHdKO5rJUbohbvdCcjrhSz3wXKfhPRNGu3ELwVNKIF35DibfQ2Ymt3fNeNHJuksEKICw= Received: from PAXPR08MB6926.eurprd08.prod.outlook.com (2603:10a6:102:138::24) by DU0PR08MB8496.eurprd08.prod.outlook.com (2603:10a6:10:403::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27; Fri, 5 May 2023 11:03:05 +0000 Received: from PAXPR08MB6926.eurprd08.prod.outlook.com ([fe80::db73:66ba:ae70:1ff1]) by PAXPR08MB6926.eurprd08.prod.outlook.com ([fe80::db73:66ba:ae70:1ff1%3]) with mapi id 15.20.6363.027; Fri, 5 May 2023 11:03:05 +0000 From: Kyrylo Tkachov To: Christophe Lyon , "gcc-patches@gcc.gnu.org" , Richard Earnshaw , Richard Sandiford CC: Christophe Lyon Subject: RE: [PATCH 18/23] arm: [MVE intrinsics] add binary_rshift_narrow_unsigned shape Thread-Topic: [PATCH 18/23] arm: [MVE intrinsics] add binary_rshift_narrow_unsigned shape Thread-Index: AQHZfy0xbRtVBGpegE+7RJiEzxIH269Lg+4w Date: Fri, 5 May 2023 11:03:05 +0000 Message-ID: References: <20230505083930.101210-1-christophe.lyon@arm.com> <20230505083930.101210-18-christophe.lyon@arm.com> In-Reply-To: <20230505083930.101210-18-christophe.lyon@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAXPR08MB6926:EE_|DU0PR08MB8496:EE_|AM7EUR03FT056:EE_|DU0PR08MB7921:EE_ X-MS-Office365-Filtering-Correlation-Id: 400710ea-dc17-441f-51bd-08db4d58562f 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: yh+Kv+0MNBY3QHTT1s7m1apqK+VIKSFBIV9e9EpSdkmpfMIC72Rg4dKJ1ZpvSqlbKCX3he+17vU/0WTHV08jozQobwpBKb5wxXdnfOyv4g+2AUjbQdGH/UqRSCGWh9iZczcSVNTT0siogtnFA0Vyywtx4lib0kJ+jQwJouOC07UYp1d7FlPV3H4Cv+u45A4vWAWwzRPrXQ1pFw/ahblmEeZ7CMDlOaVIHdVOFmwbaXHUKm5jr7YY72b+dP5JMJYBp9arSeSbf6qjmmTOz/zW5wkORQwrs1U/2ay7busfN59gVLrF5KknJCvXUFgR6uZq/VnDBMxZbXIrx6k74Hfd0qVw0SOnhvXaj8/hNwKb+rtR3CskBe9eR9yddwjKLKMjrIpV08y2PjEjf8T6LO1MYzkZ2s5IVHy42fNYc+TJ73IGGnZK2bTsi/j4VCFRrpdL7emmHHOKTnMC4LKPhwdsK63KpHoAMfGxLeMGc4H3CXKs4tmMBVsgQtZmpa6Mzs2eduMd4NjL3hsbS7J6tcYB2uOY56gmD8qEOx6ge0hghKPzOlKxBiUAiCcbECr2UT5lpk0/dIG1vtSPcZJ0hFlWz8sr0EgfY04OZOltjfoQbcNUNPv67WZlQf8d7W8QM8EC X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6926.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(346002)(376002)(366004)(136003)(451199021)(71200400001)(86362001)(33656002)(316002)(110136005)(6636002)(4326008)(66946007)(66476007)(66556008)(66446008)(64756008)(7696005)(76116006)(478600001)(41300700001)(55016003)(8936002)(5660300002)(52536014)(8676002)(2906002)(38070700005)(186003)(38100700002)(122000001)(9686003)(26005)(53546011)(6506007)(83380400001);DIR:OUT;SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8496 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: AM7EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 04d2daed-385e-4c19-7f14-08db4d584d8e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nl4cGMSqeGZQ3vjEEG7BV3//i3eBI79WbJG7zVrlxZnMD/9ZlEQVBWbP77WEbFyWUg65pG+fK6fUa0yPP1xlBdtXU2V4EXDI9boVCfjg3eNhoVUVg0gg4JUoRyyIiPLkv4twrLeobl7cwhIplHxoFXq0NWPbDyIr+q3lOucTtJ7a5oHoHj5em51iUIQNUK30PKCJySjhhKxOTPsXIi2p2nD/f9cRhCQYeJ8Ok0twxCteEX/m9mm5C6BHKPhiB9g46mN+mxzT8/+gy95Iiv+EaSBPFAX2b/OgyKkPPaqXHbDBgPKa12baAOD3/dkmj39r6C9XNE/2LBZI3YIFoiIIs4J+kwNq620AMGUaYmSyKQ3VIDd6FFbvbcnZcqy3PJ2r9xVW3wzE06sSCP8YGt5EeRSvWkS3EYhgO66aWTz8FBc0GPLhr3ezTHimkx3lvrlc8zMQB6UOEPZCOmBivgI60RJLQ5CifD/ez81+nabEUDZCKe/wxCb5gskJNVcgogPicnzzqQ2IbsKLJSC4uwSlZpOtdSdNm6ixzlAFMQA9UQqNyRAe1MInU1vbfY2DG19P5QYRFfftE6T9YtA5CPMU8IFT2+fz+DFn6CuFKrPpit6qpAf44yFcqmB0iciaMuDSor2s3xxc76Qoxw/1QEL2pXS3A2VEyjCjqy6NoliUI5CnXHTE6ueBHyk39oem392mVuPLo7v/L2cz96VyeNoaqKEGjdlzmU5Tj4iix5OhDDE= 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)(376002)(39860400002)(396003)(346002)(451199021)(46966006)(36840700001)(40470700004)(33656002)(86362001)(110136005)(316002)(6636002)(4326008)(70586007)(70206006)(7696005)(478600001)(41300700001)(40480700001)(82310400005)(55016003)(8936002)(5660300002)(52536014)(8676002)(2906002)(34020700004)(82740400003)(81166007)(356005)(186003)(9686003)(6506007)(26005)(36860700001)(53546011)(47076005)(336012)(83380400001)(40460700003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2023 11:03:20.0834 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 400710ea-dc17-441f-51bd-08db4d58562f 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: AM7EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7921 X-Spam-Status: No, score=-11.5 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 List-Id: > -----Original Message----- > From: Christophe Lyon > Sent: Friday, May 5, 2023 9:39 AM > To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov ; > Richard Earnshaw ; Richard Sandiford > > Cc: Christophe Lyon > Subject: [PATCH 18/23] arm: [MVE intrinsics] add > binary_rshift_narrow_unsigned shape >=20 > This patch adds the binary_rshift_narrow_unsigned shape description. Ok. Thanks, Kyrill >=20 > 2022-09-08 Christophe Lyon >=20 > gcc/ > * config/arm/arm-mve-builtins-shapes.cc > (binary_rshift_narrow_unsigned): New. > * config/arm/arm-mve-builtins-shapes.h > (binary_rshift_narrow_unsigned): New. > --- > gcc/config/arm/arm-mve-builtins-shapes.cc | 48 +++++++++++++++++++++++ > gcc/config/arm/arm-mve-builtins-shapes.h | 1 + > 2 files changed, 49 insertions(+) >=20 > diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/a= rm- > mve-builtins-shapes.cc > index 88934e1ca15..e3bf586565c 100644 > --- a/gcc/config/arm/arm-mve-builtins-shapes.cc > +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc > @@ -664,6 +664,54 @@ struct binary_rshift_narrow_def : public > overloaded_base<0> > }; > SHAPE (binary_rshift_narrow) >=20 > +/* _t vfoo[_n_t0](_t, _t, const int) > + > + Vector saturating rounding shift right and narrow. > + Check that 'imm' is in the [1..#bits/2] range. > + > + Example: vqshrunbq. > + uint8x16_t [__arm_]vqshrunbq[_n_s16](uint8x16_t a, int16x8_t b, const= int > imm) > + uint8x16_t [__arm_]vqshrunbq_m[_n_s16](uint8x16_t a, int16x8_t b, > const int imm, mve_pred16_t p) */ > +struct binary_rshift_narrow_unsigned_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, "vhu0,vhu0,v0,ss32", 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 (3, i, nargs) > + || (type =3D r.infer_vector_type (1)) =3D=3D NUM_TYPE_SUFFIXES > + || !r.require_integer_immediate (i)) > + return error_mark_node; > + > + type_suffix_index narrow_suffix > + =3D find_type_suffix (TYPE_unsigned, > + type_suffixes[type].element_bits / 2); > + > + if (!r.require_matching_vector_type (0, narrow_suffix)) > + return error_mark_node; > + > + return r.resolve_to (r.mode_suffix_id, type); > + } > + > + bool > + check (function_checker &c) const override > + { > + unsigned int bits =3D c.type_suffix (0).element_bits; > + return c.require_immediate_range (2, 1, bits / 2); > + } > + > +}; > +SHAPE (binary_rshift_narrow_unsigned) > + > /* xN_t vfoo[_t0](uint64_t, uint64_t) >=20 > where there are N arguments in total. > diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/ar= m- > mve-builtins-shapes.h > index d72686d187b..ca1c1017e8e 100644 > --- a/gcc/config/arm/arm-mve-builtins-shapes.h > +++ b/gcc/config/arm/arm-mve-builtins-shapes.h > @@ -41,6 +41,7 @@ namespace arm_mve > extern const function_shape *const binary_orrq; > extern const function_shape *const binary_round_lshift; > extern const function_shape *const binary_rshift_narrow; > + extern const function_shape *const binary_rshift_narrow_unsigned; > extern const function_shape *const create; > extern const function_shape *const inherent; > extern const function_shape *const unary_convert; > -- > 2.34.1