From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2072.outbound.protection.outlook.com [40.107.8.72]) by sourceware.org (Postfix) with ESMTPS id BD46C3858D1E for ; Tue, 2 May 2023 15:49:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD46C3858D1E 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=I0c1XuRG70x0KzKpIK+qMJDP2gtWcNPy3L9/lMBr5BQ=; b=S5a9oQtkooNt1pNa6rSHOJ1Ex2Y8G02jj9SCC9L2hPMdh1p4kvI4xSGj0MRBQDfau9KUJWiXemnKTV81nghPcvg12cJOySM85rdz8Kl5T2ng41UerieA/aYeCHii+ZWNh8068WfCvtBf1viGaQPd9kmg2wM2inRmqQEX8VYoYPA= Received: from DUZPR01CA0189.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::7) by DB4PR08MB9863.eurprd08.prod.outlook.com (2603:10a6:10:3f0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.31; Tue, 2 May 2023 15:49:21 +0000 Received: from DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b6:cafe::29) by DUZPR01CA0189.outlook.office365.com (2603:10a6:10:4b6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.31 via Frontend Transport; Tue, 2 May 2023 15:49:21 +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 DBAEUR03FT032.mail.protection.outlook.com (100.127.142.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.20 via Frontend Transport; Tue, 2 May 2023 15:49:21 +0000 Received: ("Tessian outbound 99a3040377ca:v136"); Tue, 02 May 2023 15:49:21 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: eb0df0000433055f X-CR-MTA-TID: 64aa7808 Received: from e49336d65220.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D98C310C-13F5-4FA2-B9BE-9DEA9BB48B8C.1; Tue, 02 May 2023 15:49:14 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e49336d65220.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 02 May 2023 15:49:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CUrLdwyfF0rY5lcTrAJzMsREZ7ZjTC0KHHskfE9I7oGMECVM9pRLmAQEqimKD/2wCZIoZw5JcUydD8G9YQjxULk3ulH4G05LtjcQyW5U+OFIvvID7lX6sRCk1IRMWUorJOnk9UJe9iQ/pcVw17TWl15tv8CxNNOgPDqC681l7h6yH4IdJNpJTYID16mxqn472OLzJpxBobRAcPKqx4VYD2JMOnPUcoVN4BXS9i2VPp8Wdulmsh4EQhUaOUbtxaj9xexWu6ZFD2hGFqRJkZb7O5wXD6rFT/eB9zxS7folUzf3lQTctuoluvjFwWo9EPJzDpZXkR5pOR8oFa32H3Ygww== 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=I0c1XuRG70x0KzKpIK+qMJDP2gtWcNPy3L9/lMBr5BQ=; b=Bj+I73xT1ifMlnaqSKACar/4i8STqEuLaxGXBTuDwyforJZQUBbUwjrFe81l6f2rkSGmxf4rXgGQPL+KYWkmd1GSq9lr0fDGPUTA+XOhMWJOBL8woikbweR22GRPdIorn0xHtv1pguPSndSlZWdgZJefnhwvEXKaYGQwYLlKF2XMKNCZsiZLfxpq6qTvJpuD2cjWGkV/7G2eR4Y1P54gZoY+LuB3V2jXpAdJ4TgwrYtKDcFutdqi+Vs2e2zhpud7Gp90AVddFnSnCJLdIfXUUE4Mqva2pNZAXzeNTJuqoGoiJAKFVJv8xLa0KNCmpvE8ZnEpj713zBdd7il1E/ObqQ== 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=I0c1XuRG70x0KzKpIK+qMJDP2gtWcNPy3L9/lMBr5BQ=; b=S5a9oQtkooNt1pNa6rSHOJ1Ex2Y8G02jj9SCC9L2hPMdh1p4kvI4xSGj0MRBQDfau9KUJWiXemnKTV81nghPcvg12cJOySM85rdz8Kl5T2ng41UerieA/aYeCHii+ZWNh8068WfCvtBf1viGaQPd9kmg2wM2inRmqQEX8VYoYPA= 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 AS8PR08MB6376.eurprd08.prod.outlook.com (2603:10a6:20b:33e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.31; Tue, 2 May 2023 15:49:09 +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.6340.031; Tue, 2 May 2023 15:49:09 +0000 Message-ID: <132f5b97-20d1-6a89-6f70-aa584b7e5eca@arm.com> Date: Tue, 2 May 2023 17:49:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 03/22] arm: [MVE intrinsics] Rework vreinterpretq Content-Language: en-US To: Kyrylo Tkachov , "gcc-patches@gcc.gnu.org" , Richard Earnshaw , Richard Sandiford References: <20230418134608.244751-1-christophe.lyon@arm.com> <20230418134608.244751-4-christophe.lyon@arm.com> <05878dfb-15cc-f7e1-e0c1-9d81532a46b0@arm.com> From: Christophe Lyon In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0078.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::11) To VI1PR08MB3390.eurprd08.prod.outlook.com (2603:10a6:803:7d::27) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3390:EE_|AS8PR08MB6376:EE_|DBAEUR03FT032:EE_|DB4PR08MB9863:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ce32e30-77af-4790-0e19-08db4b24cbc7 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: MTymd72ZEUpiaRGK29cmQ6HHkBE121BL6nOUqGUXsTqfMwHxWCP3rP9UT8kLygqbEO3WtTQjcHZqH6Ht2SlXczum01EGHCXUxAGzwUmLdgFNq1ETN7f37HrDOtOitPZNx5iAELTaGI40ByI/SLmcJJpfW5dihvgd0XUQnuLnFWvoQm6+Ygj4pe0wTXRGkmJiK5+Uo2FWhzsRj121hHNCl7mXIQsaYU3qyyP/3WW5wM2QUiGECNQac6epjMZmy1LPjA3yxC1XnlezWFjYE2FhRPKfY0lIna8nB8VuEGFXtLycw2/E2g8f668l/3KtqHgf+yfGT7I97TmqMt0XPiQ/Lktm/b0ODEkkDp8amBxBb8OHGFucmUcWyEkSsE0ib+ldzALWga9ciZb0YdBMyiumFrRwN9yprcrguShDtWbjzwsU7HQbqv0C/tPv0zDapRj69IFXpa/vWedjJusEROx3wuQ/idQ+0oh4DrzC+81M3UsgwT+e02QzwDPizx/sR4tG66yTXbCP1TXIX1z1kpep9hV6XIekYS/iGvjv5SPFVGpKx16LPXe1wNO4YhCkbyU0paxs3blLh41zpF5GfHs16Em5oCPbyAVyANS0FKg470jB3MjT+lwP0QSc2IrFwcRMYhK5xeCikt9XUyLE5YUuxHUgTGDoaz/r1egx6EvYIeOxyMkZXtk5intrFR5H8YN6 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)(376002)(346002)(39860400002)(366004)(396003)(136003)(451199021)(478600001)(26005)(6512007)(53546011)(6506007)(6486002)(110136005)(83380400001)(84970400001)(186003)(31686004)(2616005)(66476007)(38100700002)(66946007)(6636002)(41300700001)(8676002)(8936002)(66556008)(5660300002)(316002)(44832011)(86362001)(31696002)(30864003)(2906002)(36756003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6376 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: DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 96e0df29-5955-4fca-d32d-08db4b24c442 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /7nqF1tWk95Hhr8HGvep+ssXI1m+AWm95INetjzPuZFopeVJZpLhp4nkUhQZadCMSTMqRqEwYuCr+Ayyr4w5NFLg8Oln1bOMVSMu0E81NOTzg+dbPZ42Z72FqLgf0a+MoWS9EjCto8KV4eyVgt3zixeqHQpoFxTdECQ1AHnrrxa+qbfyqkgN3rBWdoqYnmR41w6ZaazoSsCs0fzL+7+XdbNkdQ4ySMiW1auBd8EDzV/Hc23PUiyMtTDiMg+dO6e8RUEmI2Hq/jziA3S3A4dcJAFeMvTZY3DRBvtUOXbdqiaYdI10iWapF9NFz1snpjWO6XcJXLgenMmEhslzMxwAoEx9fiLhC06x4b6gHfwHPc6t8GlPrqsx7UakdR34fojqF4Qr/UjSgfdlKBHIjgKg2NYPDqu/0555WcHFiQtbJGT9ubc+GOmrDzrS+3MfoqB6d2Ejz/csUAd51sAIogqH7Q7zeO3CfQLqQ48UrdQlYg9FQz4l6HwrjaWt1zgSBzxAlONl9fM2B7Li8szjU39c/u4G8uw58Roo75v80yv1DmE94/mS0SXk0TtvyhA3ucCfBvwAZH9KCAS/jGpwaOhIOjiIy2fJFgGn4PsaKczDofx+IzFXIDBqEA8f8VJK3VQvaZzlWvSlKSK9rQBTnwJm/spLsZ1WMKzqqcv9niSdf35LUEAs756A7yMHh7h9mu8g5C+dKJq0boHpJsNnMcvDCguZHuf8dEfGY27If6NZD92f38IK9b9NaQXbNbROlD3eAraaO+PR2a2mg//kjTA4f7Ra3/oJpIQJFrJ+RCDK2HA= 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)(39860400002)(396003)(346002)(376002)(136003)(451199021)(40470700004)(46966006)(36840700001)(82740400003)(6512007)(53546011)(356005)(26005)(81166007)(186003)(6506007)(336012)(47076005)(83380400001)(34020700004)(8676002)(8936002)(5660300002)(82310400005)(36756003)(41300700001)(44832011)(2906002)(40460700003)(30864003)(478600001)(40480700001)(31696002)(6486002)(110136005)(316002)(2616005)(70206006)(70586007)(86362001)(6636002)(84970400001)(31686004)(36860700001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2023 15:49:21.2626 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ce32e30-77af-4790-0e19-08db4b24cbc7 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: DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB9863 X-Spam-Status: No, score=-13.1 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/2/23 17:28, Kyrylo Tkachov wrote: > > >> -----Original Message----- >> From: Christophe Lyon >> Sent: Tuesday, May 2, 2023 3:05 PM >> To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org; >> Richard Earnshaw ; Richard Sandiford >> >> Subject: Re: [PATCH 03/22] arm: [MVE intrinsics] Rework vreinterpretq >> >> >> >> >> On 5/2/23 12:26, Kyrylo Tkachov wrote: >> >> >> Hi Christophe, >> >> >> -----Original Message----- >> From: Christophe Lyon >> >> Sent: Tuesday, April 18, 2023 2:46 PM >> To: gcc-patches@gcc.gnu.org > patches@gcc.gnu.org> ; Kyrylo Tkachov >> ; >> Richard Earnshaw >> ; Richard Sandiford >> >> >> Cc: Christophe Lyon >> >> Subject: [PATCH 03/22] arm: [MVE intrinsics] Rework >> vreinterpretq >> >> This patch implements vreinterpretq using the new MVE >> intrinsics >> framework. >> >> The old definitions for vreinterpretq are removed as a >> consequence. >> >> 2022-09-08 Murray Steele >> >> Christophe Lyon >> >> >> gcc/ >> * config/arm/arm-mve-builtins-base.cc >> (vreinterpretq_impl): New >> class. >> * config/arm/arm-mve-builtins-base.def: Define >> vreinterpretq. >> * config/arm/arm-mve-builtins-base.h >> (vreinterpretq): New >> declaration. >> * config/arm/arm-mve-builtins-shapes.cc >> (parse_element_type): New >> function. >> (parse_type): Likewise. >> (parse_signature): Likewise. >> (build_one): Likewise. >> (build_all): Likewise. >> (overloaded_base): New struct. >> (unary_convert_def): Likewise. >> * config/arm/arm-mve-builtins-shapes.h >> (unary_convert): Declare. >> * config/arm/arm-mve-builtins.cc >> (TYPES_reinterpret_signed1): New >> macro. >> (TYPES_reinterpret_unsigned1): Likewise. >> (TYPES_reinterpret_integer): Likewise. >> (TYPES_reinterpret_integer1): Likewise. >> (TYPES_reinterpret_float1): Likewise. >> (TYPES_reinterpret_float): Likewise. >> (reinterpret_integer): New. >> (reinterpret_float): New. >> (handle_arm_mve_h): Register builtins. >> * config/arm/arm_mve.h (vreinterpretq_s16): >> Remove. >> (vreinterpretq_s32): Likewise. >> (vreinterpretq_s64): Likewise. >> (vreinterpretq_s8): Likewise. >> (vreinterpretq_u16): Likewise. >> (vreinterpretq_u32): Likewise. >> (vreinterpretq_u64): Likewise. >> (vreinterpretq_u8): Likewise. >> (vreinterpretq_f16): Likewise. >> (vreinterpretq_f32): Likewise. >> (vreinterpretq_s16_s32): Likewise. >> (vreinterpretq_s16_s64): Likewise. >> (vreinterpretq_s16_s8): Likewise. >> (vreinterpretq_s16_u16): Likewise. >> (vreinterpretq_s16_u32): Likewise. >> (vreinterpretq_s16_u64): Likewise. >> (vreinterpretq_s16_u8): Likewise. >> (vreinterpretq_s32_s16): Likewise. >> (vreinterpretq_s32_s64): Likewise. >> (vreinterpretq_s32_s8): Likewise. >> (vreinterpretq_s32_u16): Likewise. >> (vreinterpretq_s32_u32): Likewise. >> (vreinterpretq_s32_u64): Likewise. >> (vreinterpretq_s32_u8): Likewise. >> (vreinterpretq_s64_s16): Likewise. >> (vreinterpretq_s64_s32): Likewise. >> (vreinterpretq_s64_s8): Likewise. >> (vreinterpretq_s64_u16): Likewise. >> (vreinterpretq_s64_u32): Likewise. >> (vreinterpretq_s64_u64): Likewise. >> (vreinterpretq_s64_u8): Likewise. >> (vreinterpretq_s8_s16): Likewise. >> (vreinterpretq_s8_s32): Likewise. >> (vreinterpretq_s8_s64): Likewise. >> (vreinterpretq_s8_u16): Likewise. >> (vreinterpretq_s8_u32): Likewise. >> (vreinterpretq_s8_u64): Likewise. >> (vreinterpretq_s8_u8): Likewise. >> (vreinterpretq_u16_s16): Likewise. >> (vreinterpretq_u16_s32): Likewise. >> (vreinterpretq_u16_s64): Likewise. >> (vreinterpretq_u16_s8): Likewise. >> (vreinterpretq_u16_u32): Likewise. >> (vreinterpretq_u16_u64): Likewise. >> (vreinterpretq_u16_u8): Likewise. >> (vreinterpretq_u32_s16): Likewise. >> (vreinterpretq_u32_s32): Likewise. >> (vreinterpretq_u32_s64): Likewise. >> (vreinterpretq_u32_s8): Likewise. >> (vreinterpretq_u32_u16): Likewise. >> (vreinterpretq_u32_u64): Likewise. >> (vreinterpretq_u32_u8): Likewise. >> (vreinterpretq_u64_s16): Likewise. >> (vreinterpretq_u64_s32): Likewise. >> (vreinterpretq_u64_s64): Likewise. >> (vreinterpretq_u64_s8): Likewise. >> (vreinterpretq_u64_u16): Likewise. >> (vreinterpretq_u64_u32): Likewise. >> (vreinterpretq_u64_u8): Likewise. >> (vreinterpretq_u8_s16): Likewise. >> (vreinterpretq_u8_s32): Likewise. >> (vreinterpretq_u8_s64): Likewise. >> (vreinterpretq_u8_s8): Likewise. >> (vreinterpretq_u8_u16): Likewise. >> (vreinterpretq_u8_u32): Likewise. >> (vreinterpretq_u8_u64): Likewise. >> (vreinterpretq_s32_f16): Likewise. >> (vreinterpretq_s32_f32): Likewise. >> (vreinterpretq_u16_f16): Likewise. >> (vreinterpretq_u16_f32): Likewise. >> (vreinterpretq_u32_f16): Likewise. >> (vreinterpretq_u32_f32): Likewise. >> (vreinterpretq_u64_f16): Likewise. >> (vreinterpretq_u64_f32): Likewise. >> (vreinterpretq_u8_f16): Likewise. >> (vreinterpretq_u8_f32): Likewise. >> (vreinterpretq_f16_f32): Likewise. >> (vreinterpretq_f16_s16): Likewise. >> (vreinterpretq_f16_s32): Likewise. >> (vreinterpretq_f16_s64): Likewise. >> (vreinterpretq_f16_s8): Likewise. >> (vreinterpretq_f16_u16): Likewise. >> (vreinterpretq_f16_u32): Likewise. >> (vreinterpretq_f16_u64): Likewise. >> (vreinterpretq_f16_u8): Likewise. >> (vreinterpretq_f32_f16): Likewise. >> (vreinterpretq_f32_s16): Likewise. >> (vreinterpretq_f32_s32): Likewise. >> (vreinterpretq_f32_s64): Likewise. >> (vreinterpretq_f32_s8): Likewise. >> (vreinterpretq_f32_u16): Likewise. >> (vreinterpretq_f32_u32): Likewise. >> (vreinterpretq_f32_u64): Likewise. >> (vreinterpretq_f32_u8): Likewise. >> (vreinterpretq_s16_f16): Likewise. >> (vreinterpretq_s16_f32): Likewise. >> (vreinterpretq_s64_f16): Likewise. >> (vreinterpretq_s64_f32): Likewise. >> (vreinterpretq_s8_f16): Likewise. >> (vreinterpretq_s8_f32): Likewise. >> (__arm_vreinterpretq_f16): Likewise. >> (__arm_vreinterpretq_f32): Likewise. >> (__arm_vreinterpretq_s16): Likewise. >> (__arm_vreinterpretq_s32): Likewise. >> (__arm_vreinterpretq_s64): Likewise. >> (__arm_vreinterpretq_s8): Likewise. >> (__arm_vreinterpretq_u16): Likewise. >> (__arm_vreinterpretq_u32): Likewise. >> (__arm_vreinterpretq_u64): Likewise. >> (__arm_vreinterpretq_u8): Likewise. >> * config/arm/arm_mve_types.h >> (__arm_vreinterpretq_s16_s32): >> Remove. >> (__arm_vreinterpretq_s16_s64): Likewise. >> (__arm_vreinterpretq_s16_s8): Likewise. >> (__arm_vreinterpretq_s16_u16): Likewise. >> (__arm_vreinterpretq_s16_u32): Likewise. >> (__arm_vreinterpretq_s16_u64): Likewise. >> (__arm_vreinterpretq_s16_u8): Likewise. >> (__arm_vreinterpretq_s32_s16): Likewise. >> (__arm_vreinterpretq_s32_s64): Likewise. >> (__arm_vreinterpretq_s32_s8): Likewise. >> (__arm_vreinterpretq_s32_u16): Likewise. >> (__arm_vreinterpretq_s32_u32): Likewise. >> (__arm_vreinterpretq_s32_u64): Likewise. >> (__arm_vreinterpretq_s32_u8): Likewise. >> (__arm_vreinterpretq_s64_s16): Likewise. >> (__arm_vreinterpretq_s64_s32): Likewise. >> (__arm_vreinterpretq_s64_s8): Likewise. >> (__arm_vreinterpretq_s64_u16): Likewise. >> (__arm_vreinterpretq_s64_u32): Likewise. >> (__arm_vreinterpretq_s64_u64): Likewise. >> (__arm_vreinterpretq_s64_u8): Likewise. >> (__arm_vreinterpretq_s8_s16): Likewise. >> (__arm_vreinterpretq_s8_s32): Likewise. >> (__arm_vreinterpretq_s8_s64): Likewise. >> (__arm_vreinterpretq_s8_u16): Likewise. >> (__arm_vreinterpretq_s8_u32): Likewise. >> (__arm_vreinterpretq_s8_u64): Likewise. >> (__arm_vreinterpretq_s8_u8): Likewise. >> (__arm_vreinterpretq_u16_s16): Likewise. >> (__arm_vreinterpretq_u16_s32): Likewise. >> (__arm_vreinterpretq_u16_s64): Likewise. >> (__arm_vreinterpretq_u16_s8): Likewise. >> (__arm_vreinterpretq_u16_u32): Likewise. >> (__arm_vreinterpretq_u16_u64): Likewise. >> (__arm_vreinterpretq_u16_u8): Likewise. >> (__arm_vreinterpretq_u32_s16): Likewise. >> (__arm_vreinterpretq_u32_s32): Likewise. >> (__arm_vreinterpretq_u32_s64): Likewise. >> (__arm_vreinterpretq_u32_s8): Likewise. >> (__arm_vreinterpretq_u32_u16): Likewise. >> (__arm_vreinterpretq_u32_u64): Likewise. >> (__arm_vreinterpretq_u32_u8): Likewise. >> (__arm_vreinterpretq_u64_s16): Likewise. >> (__arm_vreinterpretq_u64_s32): Likewise. >> (__arm_vreinterpretq_u64_s64): Likewise. >> (__arm_vreinterpretq_u64_s8): Likewise. >> (__arm_vreinterpretq_u64_u16): Likewise. >> (__arm_vreinterpretq_u64_u32): Likewise. >> (__arm_vreinterpretq_u64_u8): Likewise. >> (__arm_vreinterpretq_u8_s16): Likewise. >> (__arm_vreinterpretq_u8_s32): Likewise. >> (__arm_vreinterpretq_u8_s64): Likewise. >> (__arm_vreinterpretq_u8_s8): Likewise. >> (__arm_vreinterpretq_u8_u16): Likewise. >> (__arm_vreinterpretq_u8_u32): Likewise. >> (__arm_vreinterpretq_u8_u64): Likewise. >> (__arm_vreinterpretq_s32_f16): Likewise. >> (__arm_vreinterpretq_s32_f32): Likewise. >> (__arm_vreinterpretq_s16_f16): Likewise. >> (__arm_vreinterpretq_s16_f32): Likewise. >> (__arm_vreinterpretq_s64_f16): Likewise. >> (__arm_vreinterpretq_s64_f32): Likewise. >> (__arm_vreinterpretq_s8_f16): Likewise. >> (__arm_vreinterpretq_s8_f32): Likewise. >> (__arm_vreinterpretq_u16_f16): Likewise. >> (__arm_vreinterpretq_u16_f32): Likewise. >> (__arm_vreinterpretq_u32_f16): Likewise. >> (__arm_vreinterpretq_u32_f32): Likewise. >> (__arm_vreinterpretq_u64_f16): Likewise. >> (__arm_vreinterpretq_u64_f32): Likewise. >> (__arm_vreinterpretq_u8_f16): Likewise. >> (__arm_vreinterpretq_u8_f32): Likewise. >> (__arm_vreinterpretq_f16_f32): Likewise. >> (__arm_vreinterpretq_f16_s16): Likewise. >> (__arm_vreinterpretq_f16_s32): Likewise. >> (__arm_vreinterpretq_f16_s64): Likewise. >> (__arm_vreinterpretq_f16_s8): Likewise. >> (__arm_vreinterpretq_f16_u16): Likewise. >> (__arm_vreinterpretq_f16_u32): Likewise. >> (__arm_vreinterpretq_f16_u64): Likewise. >> (__arm_vreinterpretq_f16_u8): Likewise. >> (__arm_vreinterpretq_f32_f16): Likewise. >> (__arm_vreinterpretq_f32_s16): Likewise. >> (__arm_vreinterpretq_f32_s32): Likewise. >> (__arm_vreinterpretq_f32_s64): Likewise. >> (__arm_vreinterpretq_f32_s8): Likewise. >> (__arm_vreinterpretq_f32_u16): Likewise. >> (__arm_vreinterpretq_f32_u32): Likewise. >> (__arm_vreinterpretq_f32_u64): Likewise. >> (__arm_vreinterpretq_f32_u8): Likewise. >> (__arm_vreinterpretq_s16): Likewise. >> (__arm_vreinterpretq_s32): Likewise. >> (__arm_vreinterpretq_s64): Likewise. >> (__arm_vreinterpretq_s8): Likewise. >> (__arm_vreinterpretq_u16): Likewise. >> (__arm_vreinterpretq_u32): Likewise. >> (__arm_vreinterpretq_u64): Likewise. >> (__arm_vreinterpretq_u8): Likewise. >> (__arm_vreinterpretq_f16): Likewise. >> (__arm_vreinterpretq_f32): Likewise. >> * config/arm/mve.md >> (@arm_mve_reinterpret): New >> pattern. >> * config/arm/unspecs.md: (REINTERPRET): New >> unspec. >> >> gcc/testsuite/ >> * g++.target/arm/mve.exp: Add general-c++ and >> general directories. >> * g++.target/arm/mve/general-c++/nomve_fp_1.c: >> New test. >> * g++.target/arm/mve/general-c++/vreinterpretq_1.C: >> New test. >> * gcc.target/arm/mve/general-c/nomve_fp_1.c: New >> test. >> * gcc.target/arm/mve/general-c/vreinterpretq_1.c: >> New test. >> --- >> gcc/config/arm/arm-mve-builtins-base.cc | 29 + >> gcc/config/arm/arm-mve-builtins-base.def | 2 + >> gcc/config/arm/arm-mve-builtins-base.h | 2 + >> gcc/config/arm/arm-mve-builtins-shapes.cc | 28 + >> gcc/config/arm/arm-mve-builtins-shapes.h | 8 + >> gcc/config/arm/arm-mve-builtins.cc | 60 + >> gcc/config/arm/arm_mve.h | 300 ---- >> gcc/config/arm/arm_mve_types.h | 1365 +------------- >> --- >> gcc/config/arm/mve.md | 18 + >> gcc/config/arm/unspecs.md | 1 + >> gcc/testsuite/g++.target/arm/mve.exp | 8 +- >> .../arm/mve/general-c++/nomve_fp_1.c | 15 + >> .../arm/mve/general-c++/vreinterpretq_1.C | 25 + >> .../gcc.target/arm/mve/general-c/nomve_fp_1.c | 15 + >> .../arm/mve/general-c/vreinterpretq_1.c | 25 + >> 15 files changed, 286 insertions(+), 1615 deletions(-) >> create mode 100644 >> gcc/testsuite/g++.target/arm/mve/general- >> c++/nomve_fp_1.c >> create mode 100644 >> gcc/testsuite/g++.target/arm/mve/general- >> c++/vreinterpretq_1.C >> create mode 100644 >> gcc/testsuite/gcc.target/arm/mve/general- >> c/nomve_fp_1.c >> create mode 100644 >> gcc/testsuite/gcc.target/arm/mve/general- >> c/vreinterpretq_1.c >> >> diff --git a/gcc/config/arm/arm-mve-builtins-base.cc >> b/gcc/config/arm/arm- >> mve-builtins-base.cc >> index e9f285faf2b..ad8d500afc6 100644 >> --- a/gcc/config/arm/arm-mve-builtins-base.cc >> +++ b/gcc/config/arm/arm-mve-builtins-base.cc >> @@ -38,8 +38,37 @@ using namespace arm_mve; >> >> namespace { >> >> +/* Implements vreinterpretq_* intrinsics. */ >> +class vreinterpretq_impl : public quiet >> +{ >> + gimple * >> + fold (gimple_folder &f) const override >> + { >> + /* Punt to rtl if the effect of the reinterpret on registers >> does not >> + conform to GCC's endianness model. */ >> + if (!targetm.can_change_mode_class (f.vector_mode (0), >> + f.vector_mode (1), >> VFP_REGS)) >> + return NULL; >> + >> >> >> So we punt to an RTL pattern here if we cannot change mode class... >> >> [snip] >> >> >> diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md >> index 35eab6c94bf..ab688396f97 100644 >> --- a/gcc/config/arm/mve.md >> +++ b/gcc/config/arm/mve.md >> @@ -10561,3 +10561,21 @@ (define_expand >> "vcond_mask_" >> } >> DONE; >> }) >> + >> +;; Reinterpret operand 1 in operand 0's mode, without >> changing its contents. >> +(define_expand "@arm_mve_reinterpret" >> + [(set (match_operand:MVE_vecs 0 "register_operand") >> + (unspec:MVE_vecs >> + [(match_operand 1 "arm_any_register_operand")] >> + REINTERPRET))] >> + "(TARGET_HAVE_MVE && VALID_MVE_SI_MODE >> (mode)) >> + || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE >> (mode))" >> + { >> + machine_mode src_mode = GET_MODE (operands[1]); >> + if (targetm.can_change_mode_class (mode, >> src_mode, >> VFP_REGS)) >> + { >> + emit_move_insn (operands[0], gen_lowpart >> (mode, >> operands[1])); >> + DONE; >> + } >> + } >> +) >> >> >> ... But we still check can_change_mode_class in this pattern and if it's >> not true we emit the new REINTERPRET unspec >> without a corresponding define_insn pattern. Won't that ICE? Would >> this case occur on big-endian targets? >> >> >> >> >> Looks like you are right. However, arm_mve.h is protected by: >> >> #if __ARM_BIG_ENDIAN >> >> #error "MVE intrinsics are not supported in Big-Endian mode." >> >> >> >> >> Just tried to hack my arm_mve.h to accept big-endian, and indeed we do ICE. >> >> >> >> >> In fact, this pattern and vreinterpretq_impl above are quite similar to the >> aarch64 implementation. >> >> I tried with a sample >> >> svint16_t foo(svint8_t value1) >> { >> return svreinterpret_s16_s8(value1); >> } >> and it seems aarch64-none-elf-gcc -march=armv8.2-a+sve -mbig-endian is OK, >> although >> aarch64_can_change_mode_class() has: >> if (BYTES_BIG_ENDIAN) >> ... >> if (from_sve_p && GET_MODE_UNIT_SIZE (from) != GET_MODE_UNIT_SIZE >> (to)) >> return false; >> so it should have a similar problem? I', not sure why it doesn't ICE? > > I believe that's because there's a pattern in aarch64-sve.md that converts everything into a simple set with the right modes forced in. > > ;; A pattern for handling type punning on big-endian targets. We use a > ;; special predicate for operand 1 to reduce the number of patterns. > (define_insn_and_split "*aarch64_sve_reinterpret" > [(set (match_operand:SVE_ALL 0 "register_operand" "=w") > (unspec:SVE_ALL > [(match_operand 1 "aarch64_any_register_operand" "w")] > UNSPEC_REINTERPRET))] > "TARGET_SVE" > "#" > "&& reload_completed" > [(set (match_dup 0) (match_dup 1))] > { > operands[1] = aarch64_replace_reg_mode (operands[1], mode); > } > ) > Ha, right, thanks. > I guess since we don't claim to support big-endian MVE for now we probably don't need to handle it, but I wonder whether we should instead > be asserting that targetm.can_change_mode_class is true in the folding code and adding a comment that it for future big-endian support it should be handled properly in the .md file as on aarch64? > Sure, I can easily add an assert, will do for v2. Thanks, Christophe > Thanks, > Kyrill > > >> Thanks, >> Christophe >> >> >> >> Thanks, >> Kyrill >> >> >> diff --git a/gcc/config/arm/unspecs.md >> b/gcc/config/arm/unspecs.md >> index 84384ee798d..dccda283573 100644 >> --- a/gcc/config/arm/unspecs.md >> +++ b/gcc/config/arm/unspecs.md >> @@ -1255,4 +1255,5 @@ (define_c_enum "unspec" [ >> SQRSHRL_64 >> SQRSHRL_48 >> VSHLCQ_M_ >> + REINTERPRET >> ]) >> >> >