Message ID | 6c8c1ae8-78b3-4310-8c75-f452e774eb3b@arm.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2530057dyb; Mon, 22 Jan 2024 04:19:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7ArHmfxzIEyGU1aOhWp9EX4meiFxgLs+w3/r7rxNBMm9/kUcBvkUcJxgLDCewaN8pcQ0I X-Received: by 2002:a05:620a:4052:b0:783:72be:ad7b with SMTP id i18-20020a05620a405200b0078372bead7bmr6122586qko.49.1705925976202; Mon, 22 Jan 2024 04:19:36 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1705925976; cv=pass; d=google.com; s=arc-20160816; b=OIzfYjwWoAaHZSjh+WBOtfcMJNxTn/tb2Lczkwi8gFUVps451QGtR+lQJSLhw9+PIA ynYMbx6MSxOYleGZ6NE9Oa5Azohg7nteCW/Vo0K9D1kKwir6EEdUae6rtIIQDWMaUAU0 3ZJJXs7N2UtD/th5j1bJhxQBcF7impISF0EBVm2vpgnRSO6hLeOW277SyY9NLwfXFsMA LA1t4ZenbWZM8C/TfX0EpohWZOX7ZJrK99FnOY3w3c08F4HB+UyT5MNYySrn/8LlyV3V LW4PzHftanQIlWQKKic7GmckO24D+mvmSN9H6bIiHrj+A9Ye/kqfsQSMQU6sC3uD9R2f 8Jqw== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:subject:from:cc:to:content-language :user-agent:date:message-id:authentication-results-original :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=GBmoHd70FwR4BUlWKPI20HtgrmJNejCqdbehbhb4Gn0=; fh=VCXbruw5cA+gwEg5utx9MzPfNuT8laa85DxmbZiFz9M=; b=XgTCNW/wA4DuRzqenpFoDkXCvxdR/owBwNE4vAu163nzRQ+y25snkPAeJ3KEMmUl7n 2nJyWZshvXXcphG9oZTE+PYuNbDyrjRjiNEO2BbpAhgbF9rzRfYzJvXdbFVkjMi+6vIL fh5KEL09JyRC4lqzkkHyL+6ur/B69pPW+3YHMhPMg6COXWjm4ogiutIaJ+9p2IaSmeFP Cqe5qhNfXM14Zfm5rKWNbfaSz9592xf2FLA1bM2Y8iNclelasoZi25JN0pybog/GS6mB Gpvba4cDg98tIh7fUZbNL1ZxOZntLanX1ECaSdHBDXBDiHuCEwfZU4z/8MzKBNjWyhnB uUsg== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=QQIApepD; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=QQIApepD; arc=pass (i=3); 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bp42-20020a05620a45aa00b0078326a6f8c2si5801842qkb.404.2024.01.22.04.19.36 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 04:19:36 -0800 (PST) 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=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=QQIApepD; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=QQIApepD; arc=pass (i=3); 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DFB81385843B for <ouuuleilei@gmail.com>; Mon, 22 Jan 2024 12:19:35 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2084.outbound.protection.outlook.com [40.107.13.84]) by sourceware.org (Postfix) with ESMTPS id D996B3858D3C for <gcc-patches@gcc.gnu.org>; Mon, 22 Jan 2024 12:18:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D996B3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D996B3858D3C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.13.84 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1705925920; cv=pass; b=Hwx7nDAsxmprrcdwSSo9NS6SI1NrmGEs4nXU743HLedt4eJeyCzLZpYxoqcUyKYMdxJP6WVIVPRwBRrr7eTPOjQ67+FvDH5MmywxFUXWGrjwY3ZAGg5bnX2NSOjti8/2GzWxNMhwyz8+6Z8jLVSdbMzMB06JmdNBCzMTiGNR/BA= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1705925920; c=relaxed/simple; bh=JLuzYrwSeo8RKXIUBeZbWz1fA2QGdm4v0iEFG0q4obo=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:To:From:Subject: MIME-Version; b=r4NwAmFLHZwysZevNC8X1PB5TH3n/hA7GCmw0jXHnd8XxmQQj9ZkTHKVrTRc8aCVKwkoYz+MrQcKct6R7liV8wVWx0tD9tJrV8kmesw9S5uFdQtbnJJd5SgF/bIS6YI2c6CINMuSvzlnC5pHeO0LzgRQEXr8D8lMGOxsViFbbHU= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=jNsNKed8HM/pgJk/MA4kO+fu8inS85fcbS6XHlHkO346LOvVG6z8NUzl9Q6+DYJGO6PTydQEqp9LzgpgsgooMGTMN9uBC8+9x09Wo015mvsuJK3AS0+9JFrK9eMMECm2Cx5IMgu0ihJYNewsfsTlleNyw47cBS9tZ+7Pf9HgOJwXvHpR3v2J3Htff+2cQPkCo+CfKjYuvjEZnlHMJ0BYmiuAr+S2pJ5y5acCemVbAfmonZSRURWUnFdscY7NT4a3rDwLp8KY5oBtVhXxifmgbt0+NK7VBUCDOjagLME6H5bErkKXFoVd8lHsNJUmkbm/R68KTr0lf06BPuI6Rq4qMg== ARC-Message-Signature: i=2; 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=GBmoHd70FwR4BUlWKPI20HtgrmJNejCqdbehbhb4Gn0=; b=U0H8zo87uhZpl/1ybbcAjEGB4lkTvSduBLR404OZ1p1Jvwz2pccO7OyS2f5salkEFlhKSjvSTLNwfG74dit/FSEGjp6Vq5/7y0r1cdhSD4aLcXZJq20X6qvojHy39CF4fmSrVYaRO6nBouwLxQbDp8mhwCrZamQI4u+2dehqoCIYkzFotk8UCnzAXIMBQ9w6cXGnt7T7BRt/mTgArjUXyl54pGo1LdXCJizJD/kieuTD93BigRt95WtBkai0o1OjylF1PN929nKy1lDQs0EWEW0jO2RZBExsigsINl8nwldZZ0rm2rU+gxaIdH0jNIuygtEbBIkYoAKjYCB+huXteA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=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=GBmoHd70FwR4BUlWKPI20HtgrmJNejCqdbehbhb4Gn0=; b=QQIApepDNnxKOXeXwMjvni/vJTaeda8GUIdfIds+23EBshS9Gx7TMely4ntS4kWcNhbiiDRN90ZZuV5OMkAUcbkTViHzeXvTsx0Trwee1wiXmwjzhwVR9ZigpKssuumBsYsPVUCOmPi7v5uGNOlVQE5gdjIaGCufhnqldKXL51E= Received: from DU2PR04CA0357.eurprd04.prod.outlook.com (2603:10a6:10:2b4::32) by DU0PR08MB8564.eurprd08.prod.outlook.com (2603:10a6:10:403::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.31; Mon, 22 Jan 2024 12:18:33 +0000 Received: from DB1PEPF00039234.eurprd03.prod.outlook.com (2603:10a6:10:2b4:cafe::72) by DU2PR04CA0357.outlook.office365.com (2603:10a6:10:2b4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.31 via Frontend Transport; Mon, 22 Jan 2024 12:18:33 +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 DB1PEPF00039234.mail.protection.outlook.com (10.167.8.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.14 via Frontend Transport; Mon, 22 Jan 2024 12:18:33 +0000 Received: ("Tessian outbound 31df1b57f90c:v228"); Mon, 22 Jan 2024 12:18:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a6a4d0f9a053467a X-CR-MTA-TID: 64aa7808 Received: from 9d9a9862e4ca.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C3ABD9C4-DF54-4656-83D5-1DCF765E8083.1; Mon, 22 Jan 2024 12:18:27 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9d9a9862e4ca.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 22 Jan 2024 12:18:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KSXrRRnBtIUASFmeuphepVppr2UrASzqMk0fYCAUSHgoA/XdbyOKv/K5WKVTus5alpU9OK004yvBBCGkxE+7CQjf6nJYDJL7c4y0IiT+rbM4TWN5jzuF2mHjh3jJ6K2YdF0CIJWIuMr4O/jPLU8aPcQK+2oazo3W5Kvu5TLAu5dpy+FgYSCPKpY3fqbqHM3s4387YsEpJE3JKmF2LcTDWywMqYJNn5mZK6+HPAtMbMsSURKcxCRhf5MLhBsAWEeY4Bh7fGxp39dbNpbAGn0soRBeIxL2huwMqkW7Md9Be/Xri1R/BG7Q0qLY1A85Y0ShE2O23T0JFwRjMaLz3AGVlw== 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=GBmoHd70FwR4BUlWKPI20HtgrmJNejCqdbehbhb4Gn0=; b=SZPQ8QQYeJJqR6DiC3O1oNBT6hPy7VzlUtoZavoeWQ4XRq186/EjOIrm+Sa9Y1WfZqZhcbkfkkM68km2ECdv8Ih4nTvYzmOYftUqqAJJ940io9P7ssh+v9MneyhZLz8dGhrvpfqUSX5jAzTb2dB117WUZcQj1Gi95+4Af0E9GZsDGl3i0FIJPF3C5zvdIV3iTUQx9F1rqn6yAeO/Zb99yidxEhRG9oRgD9D6ojBIrjaVEFxfz/gebWI9NkSXJrGrHMxWTW22CZDS2eUca34SNkhscRujMNHVRahV3WOTYeWplwQ6ZgXHbHebmV20WKHdxymGV7XYriur+GdkgzUbrw== 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=GBmoHd70FwR4BUlWKPI20HtgrmJNejCqdbehbhb4Gn0=; b=QQIApepDNnxKOXeXwMjvni/vJTaeda8GUIdfIds+23EBshS9Gx7TMely4ntS4kWcNhbiiDRN90ZZuV5OMkAUcbkTViHzeXvTsx0Trwee1wiXmwjzhwVR9ZigpKssuumBsYsPVUCOmPi7v5uGNOlVQE5gdjIaGCufhnqldKXL51E= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AM0PR08MB4227.eurprd08.prod.outlook.com (2603:10a6:208:13d::14) by DB9PR08MB9610.eurprd08.prod.outlook.com (2603:10a6:10:454::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.31; Mon, 22 Jan 2024 12:18:25 +0000 Received: from AM0PR08MB4227.eurprd08.prod.outlook.com ([fe80::5622:f8ec:7848:3610]) by AM0PR08MB4227.eurprd08.prod.outlook.com ([fe80::5622:f8ec:7848:3610%7]) with mapi id 15.20.7202.031; Mon, 22 Jan 2024 12:18:24 +0000 Content-Type: multipart/mixed; boundary="------------haVLCAXxe9QNL65ccjkQl4WV" Message-ID: <6c8c1ae8-78b3-4310-8c75-f452e774eb3b@arm.com> Date: Mon, 22 Jan 2024 12:18:27 +0000 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>, Richard Earnshaw <Richard.Earnshaw@arm.com> From: Matthieu Longo <matthieu.longo@arm.com> Subject: [PATCH][GCC][Arm] Add pattern for bswap + rotate -> rev16 [Bug 108933] X-ClientProxiedBy: LO2P265CA0499.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13b::6) To AM0PR08MB4227.eurprd08.prod.outlook.com (2603:10a6:208:13d::14) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AM0PR08MB4227:EE_|DB9PR08MB9610:EE_|DB1PEPF00039234:EE_|DU0PR08MB8564:EE_ X-MS-Office365-Filtering-Correlation-Id: fc0019cb-5f37-46d6-e228-08dc1b4440a5 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: VaNRsTL9UGfXC+Cf57UaPeIhn3HX+FmtmCV4g1UWTTkeM0V3I2VBD43Tgl2seI3zDFnzxcwSsB2x/1LwkV29F50vkYiBDpevIeQt0VKW7+fwycBVWhx4azhWUhSpYiSMii0A5PWv69B1sMXKk2fC6k635G+U19/2mfd7i+qBEf7Po6Taop0b9/6xC5uUdAMvjJLVZVKyMg3LB1ZSIREL5qLdTBVbPDTVEoB20QPD6VVS8aEXBIfcxGoQrPN4l6Z2W9KfwosZFB9Z3/AO3pVgOPbhDK5eUqY0uuK2kcXIdG+qdODbmSUXBbsM7aJST3TaKvWEdE4TkuPkraWXmZz6gBklNHtfFzJmPFH4+6LXjesqUP527WSOcuUZxXOD0+6T7goeI8sVQRhiO0cq3PdQiuuduhSr8Jxzvm4YYNxom6nimuVt/y184cneJBTSD6PGiDHZFgaatDBkbcjtYzLc2t6f1o3b6ug3x2e+dMWbsPlZR5goPkApkJh0RC+h6tdzp73JNWHXEWPKv6HznvEiapeFIW4o24JMikjbZesAPFaa/ITJiJUeKbUxqB4vOGCao4z/jQbz1AzXI13fW6jZLXwfN5Gz3rfVrthPMQ4jAqAbZK91xxZIih04xijOPpS7xe7qZ3yER2H3+0rnNo/aH2IBd+B/CpRwttTOEoPuAuYHzVqhw722cXy8P7XZJAb6 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB4227.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(366004)(376002)(346002)(39860400002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(31686004)(84970400001)(6506007)(2616005)(6512007)(33964004)(55236004)(26005)(86362001)(41300700001)(38100700002)(36756003)(66556008)(5660300002)(235185007)(2906002)(8936002)(44832011)(66476007)(8676002)(4326008)(6486002)(966005)(6916009)(478600001)(66946007)(31696002)(316002)(54906003)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9610 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: DB1PEPF00039234.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 80fc205b-df05-42bd-d2eb-08dc1b443b00 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YUmXRUXd+6rQmvvGbzpK0672D/IyT4xucv2/BUNAX7kfASsjvtU53AfkKFZDNfdVwXr2RBXwf54ypppToIDOMwjSqQ5PeGoTwMZboLKunONpp2THa/qUvVRcfj6VUZsE0/rKxq1NGHo3r4czJJBNBB3pfcB3RZIrJcqLWDRoCL8g6EFThaNk2+RqhIyWyn0C5aKJb77E/zjFtMDujtfyDCwle8qIFOtJZ3X5rMPUZBpk0tSPvuZDBJmfszIT0RE/Jxdkn89N+pnCLKWaPNU0hhODCc8OO+b1+bnuu1sKLVnL3cE82oag2gW0aZ6LUOWQodzulKogWmphxvPtrv+2PJcUtNjg2mU+kGw3Dy+FFMKx2a33zLyUhGLabTskNbA2zqyBrkNWlx/GTodkxju8iB3bMJCz0H0130OglScLFd3rPerTFPtqytQT2FEfko2qR3BWJyxMUwTVwZpdF/6iZLmigJMf3BpW2inMqRh7JFVrgigGMlHryM75poJhY45WcxzHWd2RzlRXHtsM7+1eV6jXdLX85COQLnfbO7RKS1fnz+4uio3ip4FJ34YPomxLqa9SJ9O8A2QQDJn/rD3B4rmG2slav89ugHiiT/kYWPvaxsCIF1y6gIvCsivZs706wtHqp1eqzJfMgJlVHMgik+rQ14JJ7HGDMlWqLYeJiSPWPqDMsX+X5fZfqcFbetYY49WefBLLlT5N3daFNMBB1oYZe9V8WXtCQLe4h/jikcw0MoXezWDeNu7cksWHB9iMx05MzdoJ0/0Gm8Gz7FqP4eiQdNUYuorWHE/IbW2MBeo= 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:(13230031)(4636009)(396003)(39860400002)(376002)(136003)(346002)(230922051799003)(82310400011)(186009)(64100799003)(451199024)(1800799012)(36840700001)(40470700004)(46966006)(31686004)(84970400001)(40480700001)(40460700003)(86362001)(31696002)(36756003)(81166007)(356005)(82740400003)(36860700001)(4326008)(2616005)(8676002)(8936002)(47076005)(26005)(5660300002)(70206006)(336012)(6512007)(33964004)(966005)(316002)(6506007)(6916009)(70586007)(54906003)(6486002)(44832011)(235185007)(478600001)(41300700001)(2906002)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 12:18:33.6107 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc0019cb-5f37-46d6-e228-08dc1b4440a5 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: DB1PEPF00039234.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8564 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_SHORT, 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.30 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> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788793036666152183 X-GMAIL-MSGID: 1788793036666152183 |
Series |
[GCC,Arm] Add pattern for bswap + rotate -> rev16 [Bug 108933]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Matthieu Longo
Jan. 22, 2024, 12:18 p.m. UTC
rev16 pattern was not recognised anymore as a change in the bswap tree pass was introducing a new GIMPLE form, not recognized by the assembly final transformation pass. More details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108933 gcc/ChangeLog: PR target/108933 * config/arm/arm.md (*arm_rev16si2_alt3): new pattern to convert a bswap + rotate by 16 bits into rev16 gcc/testsuite/ChangeLog: PR target/108933 * gcc.target/arm/rev16.c: Moved to... * gcc.target/arm/rev16_1.c: ...here. * gcc.target/arm/rev16_2.c: New test to check that rev16 is emitted.
Comments
On 22/01/2024 12:18, Matthieu Longo wrote: > rev16 pattern was not recognised anymore as a change in the bswap tree > pass was introducing a new GIMPLE form, not recognized by the assembly > final transformation pass. > > More details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108933 > > gcc/ChangeLog: > > PR target/108933 > * config/arm/arm.md (*arm_rev16si2_alt3): new pattern to convert > a bswap + rotate by 16 bits into rev16 ChangeLog entries need to be written as sentences, so start with a capital letter and end with a full stop; continuation lines should start in column 8 (one hard tab, don't use spaces). But in this case, "New pattern." is sufficient. > > gcc/testsuite/ChangeLog: > > PR target/108933 > * gcc.target/arm/rev16.c: Moved to... > * gcc.target/arm/rev16_1.c: ...here. > * gcc.target/arm/rev16_2.c: New test to check that rev16 is > emitted. +;; Similar pattern to match (rotate (bswap) 16) +(define_insn "*arm_rev16si2_alt3" + [(set (match_operand:SI 0 "register_operand" "=l,r") + (rotate:SI (bswap:SI (match_operand:SI 1 "register_operand" "l,r")) + (const_int 16)))] + "arm_arch6" + "rev16\\t%0, %1" + [(set_attr "arch" "t,32") + (set_attr "length" "2,4") + (set_attr "type" "rev")] +) + Unfortunately, this is insufficient. When generating Arm or Thumb2 code (but not thumb1) we also have to handle conditional execution: we need to have '%?' in the output template at the point where a condition code might be needed. That means we need separate output templates for all three alternatives (as we need a 16-bit variant for thumb2 that's conditional and a 16-bit for thumb1 that isn't). See the output of arm_rev16 for a guide of what is really needed. I note that the arm_rev16si2_alt1, and arm_rev16si2_alt2 patterns are incorrect in this regard as well; that will need fixing. I also see that arm_rev16si2 currently expands to the alt1 variant above; given that the preferred canonical form would now appear to use bswap + rotate, we should change that as well. In fact, we can merge your new pattern with the expand entirely and eliminate the need to call gen_arm_rev16si2_alt1. Something like: (define_insn "arm_rev16si2" [(set (match_operand:SI 0 "s_register_operand") (rotate:SI (bswap:SI (match_operand:SI 1 "s_register_operand")) (const_int 16))] "arm_arch6" "@ rev16... ... R.
Hi Richard, Please find below the new patch where I addressed your comments and updated the changelog. rev16 pattern was not recognised anymore as a change in the bswap tree pass was introducing a new GIMPLE form, not recognized by the assembly final transformation pass. More details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108933 gcc/ChangeLog: PR target/108933 * config/arm/arm.md (arm_rev16si2): Convert to define_insn. Correct generated RTL. (arm_rev16si2_alt1): Correctly handle conditional execution. (arm_rev16si2_alt2): Likewise. gcc/testsuite/ChangeLog: PR target/108933 * gcc.target/arm/rev16.c: Moved to... * gcc.target/arm/rev16_1.c: ...here. * gcc.target/arm/rev16_2.c: New test to check that rev16 is emitted. On 2024-01-22 16:25, Richard Earnshaw (lists) wrote: > On 22/01/2024 12:18, Matthieu Longo wrote: >> rev16 pattern was not recognised anymore as a change in the bswap tree >> pass was introducing a new GIMPLE form, not recognized by the assembly >> final transformation pass. >> >> More details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108933 >> >> gcc/ChangeLog: >> >> PR target/108933 >> * config/arm/arm.md (*arm_rev16si2_alt3): new pattern to convert >> a bswap + rotate by 16 bits into rev16 > > ChangeLog entries need to be written as sentences, so start with a capital letter and end with a full stop; continuation lines should start in column 8 (one hard tab, don't use spaces). But in this case, "New pattern." is sufficient. > >> >> gcc/testsuite/ChangeLog: >> >> PR target/108933 >> * gcc.target/arm/rev16.c: Moved to... >> * gcc.target/arm/rev16_1.c: ...here. >> * gcc.target/arm/rev16_2.c: New test to check that rev16 is >> emitted. > > > +;; Similar pattern to match (rotate (bswap) 16) > +(define_insn "*arm_rev16si2_alt3" > + [(set (match_operand:SI 0 "register_operand" "=l,r") > + (rotate:SI (bswap:SI (match_operand:SI 1 "register_operand" "l,r")) > + (const_int 16)))] > + "arm_arch6" > + "rev16\\t%0, %1" > + [(set_attr "arch" "t,32") > + (set_attr "length" "2,4") > + (set_attr "type" "rev")] > +) > + > > Unfortunately, this is insufficient. When generating Arm or Thumb2 code (but not thumb1) we also have to handle conditional execution: we need to have '%?' in the output template at the point where a condition code might be needed. That means we need separate output templates for all three alternatives (as we need a 16-bit variant for thumb2 that's conditional and a 16-bit for thumb1 that isn't). See the output of arm_rev16 for a guide of what is really needed. > > I note that the arm_rev16si2_alt1, and arm_rev16si2_alt2 patterns are incorrect in this regard as well; that will need fixing. > > I also see that arm_rev16si2 currently expands to the alt1 variant above; given that the preferred canonical form would now appear to use bswap + rotate, we should change that as well. In fact, we can merge your new pattern with the expand entirely and eliminate the need to call gen_arm_rev16si2_alt1. Something like: > > (define_insn "arm_rev16si2" > [(set (match_operand:SI 0 "s_register_operand") > (rotate:SI (bswap:SI (match_operand:SI 1 "s_register_operand")) (const_int 16))] > "arm_arch6" > "@ > rev16... > ... > > > R. > diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 4a98f2d7b6251da940806b26d4c310a7f7af927b..5816409f86f1106b410c5e21d77e599b485f85f2 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -12578,7 +12578,10 @@ (define_insn "arm_rev16si2_alt1" "arm_arch6 && aarch_rev16_shleft_mask_imm_p (operands[3], SImode) && aarch_rev16_shright_mask_imm_p (operands[2], SImode)" - "rev16\\t%0, %1" + "@ + rev16\t%0, %1 + rev16%?\t%0, %1 + rev16%?\t%0, %1" [(set_attr "arch" "t1,t2,32") (set_attr "length" "2,2,4") (set_attr "type" "rev")] @@ -12595,22 +12598,28 @@ (define_insn "*arm_rev16si2_alt2" "arm_arch6 && aarch_rev16_shleft_mask_imm_p (operands[3], SImode) && aarch_rev16_shright_mask_imm_p (operands[2], SImode)" - "rev16\\t%0, %1" + "@ + rev16\t%0, %1 + rev16%?\t%0, %1 + rev16%?\t%0, %1" [(set_attr "arch" "t1,t2,32") (set_attr "length" "2,2,4") (set_attr "type" "rev")] ) -(define_expand "arm_rev16si2" - [(set (match_operand:SI 0 "s_register_operand") - (bswap:SI (match_operand:SI 1 "s_register_operand")))] +;; Similar pattern to match (rotate (bswap) 16) +(define_insn "arm_rev16si2" + [(set (match_operand:SI 0 "register_operand" "=l,l,r") + (rotate:SI (bswap:SI (match_operand:SI 1 "register_operand" "l,l,r")) + (const_int 16)))] "arm_arch6" - { - rtx left = gen_int_mode (HOST_WIDE_INT_C (0xff00ff00ff00ff00), SImode); - rtx right = gen_int_mode (HOST_WIDE_INT_C (0xff00ff00ff00ff), SImode); - emit_insn (gen_arm_rev16si2_alt1 (operands[0], operands[1], right, left)); - DONE; - } + "@ + rev16\t%0, %1 + rev16%?\t%0, %1 + rev16%?\t%0, %1" + [(set_attr "arch" "t1,t2,32") + (set_attr "length" "2,2,4") + (set_attr "type" "rev")] ) (define_expand "bswaphi2" diff --git a/gcc/testsuite/gcc.target/arm/rev16.c b/gcc/testsuite/gcc.target/arm/rev16_1.c similarity index 100% rename from gcc/testsuite/gcc.target/arm/rev16.c rename to gcc/testsuite/gcc.target/arm/rev16_1.c diff --git a/gcc/testsuite/gcc.target/arm/rev16_2.c b/gcc/testsuite/gcc.target/arm/rev16_2.c new file mode 100644 index 0000000000000000000000000000000000000000..90213f9b49f45340ced4f29c31446971dbc88ecd --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/rev16_2.c @@ -0,0 +1,20 @@ +/* { dg-options "-O2" } */ +/* { dg-do compile } */ + +typedef unsigned int __u32; + +__u32 +__rev16_32_alt (__u32 x) +{ + return (((__u32)(x) & (__u32)0xff00ff00UL) >> 8) + | (((__u32)(x) & (__u32)0x00ff00ffUL) << 8); +} + +__u32 +__rev16_32 (__u32 x) +{ + return (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) + | (((__u32)(x) & (__u32)0xff00ff00UL) >> 8); +} + +/* { dg-final { scan-assembler-times {rev16\tr[0-9]+, r[0-9]+} 2 } } */ \ No newline at end of file
On 29/01/2024 14:14, Matthieu Longo wrote: > Hi Richard, > > Please find below the new patch where I addressed your comments and > updated the changelog. > > rev16 pattern was not recognised anymore as a change in the bswap tree > pass was introducing a new GIMPLE form, not recognized by the assembly > final transformation pass. > > More details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108933 > > gcc/ChangeLog: > > PR target/108933 > * config/arm/arm.md (arm_rev16si2): Convert to define_insn. > Correct generated RTL. > (arm_rev16si2_alt1): Correctly handle conditional execution. > (arm_rev16si2_alt2): Likewise. > > gcc/testsuite/ChangeLog: > > PR target/108933 > * gcc.target/arm/rev16.c: Moved to... > * gcc.target/arm/rev16_1.c: ...here. > * gcc.target/arm/rev16_2.c: New test to check that rev16 is > emitted. Thanks. I've tweaked the commit message very slightly and pushed this. Could you please prepare backports for gcc-11 thru 13? It should just be a matter of cherry-picking the commit. R. > > On 2024-01-22 16:25, Richard Earnshaw (lists) wrote: >> On 22/01/2024 12:18, Matthieu Longo wrote: >>> rev16 pattern was not recognised anymore as a change in the bswap tree >>> pass was introducing a new GIMPLE form, not recognized by the assembly >>> final transformation pass. >>> >>> More details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108933 >>> >>> gcc/ChangeLog: >>> >>> PR target/108933 >>> * config/arm/arm.md (*arm_rev16si2_alt3): new pattern to >>> convert >>> a bswap + rotate by 16 bits into rev16 >> >> ChangeLog entries need to be written as sentences, so start with a >> capital letter and end with a full stop; continuation lines should >> start in column 8 (one hard tab, don't use spaces). But in this case, >> "New pattern." is sufficient. >> >>> >>> gcc/testsuite/ChangeLog: >>> >>> PR target/108933 >>> * gcc.target/arm/rev16.c: Moved to... >>> * gcc.target/arm/rev16_1.c: ...here. >>> * gcc.target/arm/rev16_2.c: New test to check that rev16 is >>> emitted. >> >> >> +;; Similar pattern to match (rotate (bswap) 16) >> +(define_insn "*arm_rev16si2_alt3" >> + [(set (match_operand:SI 0 "register_operand" "=l,r") >> + (rotate:SI (bswap:SI (match_operand:SI 1 "register_operand" >> "l,r")) >> + (const_int 16)))] >> + "arm_arch6" >> + "rev16\\t%0, %1" >> + [(set_attr "arch" "t,32") >> + (set_attr "length" "2,4") >> + (set_attr "type" "rev")] >> +) >> + >> >> Unfortunately, this is insufficient. When generating Arm or Thumb2 >> code (but not thumb1) we also have to handle conditional execution: we >> need to have '%?' in the output template at the point where a >> condition code might be needed. That means we need separate output >> templates for all three alternatives (as we need a 16-bit variant for >> thumb2 that's conditional and a 16-bit for thumb1 that isn't). See >> the output of arm_rev16 for a guide of what is really needed. >> >> I note that the arm_rev16si2_alt1, and arm_rev16si2_alt2 patterns are >> incorrect in this regard as well; that will need fixing. >> >> I also see that arm_rev16si2 currently expands to the alt1 variant >> above; given that the preferred canonical form would now appear to use >> bswap + rotate, we should change that as well. In fact, we can merge >> your new pattern with the expand entirely and eliminate the need to >> call gen_arm_rev16si2_alt1. Something like: >> >> (define_insn "arm_rev16si2" >> [(set (match_operand:SI 0 "s_register_operand") >> (rotate:SI (bswap:SI (match_operand:SI 1 >> "s_register_operand")) (const_int 16))] >> "arm_arch6" >> "@ >> rev16... >> ... >> >> >> R. >>
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 4a98f2d7b6251da940806b26d4c310a7f7af927b..330c0a5ce2926439760466746a68fd5f6c5b1b09 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -12601,6 +12601,18 @@ (set_attr "type" "rev")] ) +;; Similar pattern to match (rotate (bswap) 16) +(define_insn "*arm_rev16si2_alt3" + [(set (match_operand:SI 0 "register_operand" "=l,r") + (rotate:SI (bswap:SI (match_operand:SI 1 "register_operand" "l,r")) + (const_int 16)))] + "arm_arch6" + "rev16\\t%0, %1" + [(set_attr "arch" "t,32") + (set_attr "length" "2,4") + (set_attr "type" "rev")] +) + (define_expand "arm_rev16si2" [(set (match_operand:SI 0 "s_register_operand") (bswap:SI (match_operand:SI 1 "s_register_operand")))] diff --git a/gcc/testsuite/gcc.target/arm/rev16.c b/gcc/testsuite/gcc.target/arm/rev16_1.c similarity index 100% rename from gcc/testsuite/gcc.target/arm/rev16.c rename to gcc/testsuite/gcc.target/arm/rev16_1.c diff --git a/gcc/testsuite/gcc.target/arm/rev16_2.c b/gcc/testsuite/gcc.target/arm/rev16_2.c new file mode 100644 index 0000000000000000000000000000000000000000..90213f9b49f45340ced4f29c31446971dbc88ecd --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/rev16_2.c @@ -0,0 +1,20 @@ +/* { dg-options "-O2" } */ +/* { dg-do compile } */ + +typedef unsigned int __u32; + +__u32 +__rev16_32_alt (__u32 x) +{ + return (((__u32)(x) & (__u32)0xff00ff00UL) >> 8) + | (((__u32)(x) & (__u32)0x00ff00ffUL) << 8); +} + +__u32 +__rev16_32 (__u32 x) +{ + return (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) + | (((__u32)(x) & (__u32)0xff00ff00UL) >> 8); +} + +/* { dg-final { scan-assembler-times {rev16\tr[0-9]+, r[0-9]+} 2 } } */ \ No newline at end of file