From patchwork Wed Nov 10 12:08:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1553403 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=kXqKlVb4; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hq3fz258Hz9s0r for ; Wed, 10 Nov 2021 23:14:01 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 34C633857C71 for ; Wed, 10 Nov 2021 12:13:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34C633857C71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636546439; bh=wUqfLHjQ0V7B2rpPmc3fd67bswcNmp3AcmDTYqf/s00=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=kXqKlVb46pWMfzLDCQ2Y73i94AlJomO+5l0vRRP+QzmNN79S8P7rnSnQnckzNhwSj FTvE4SpNOvDkH6ABm1/hkZnyoe5Hz0y1rsBhrT5S2EaQho3UnL3gDjVqPF48tDlsF+ d2MDYYlqNw84ZbBNJubNw4cZKsv9fhtvF+BmMl04= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00078.outbound.protection.outlook.com [40.107.0.78]) by sourceware.org (Postfix) with ESMTPS id 64EFC3857C71 for ; Wed, 10 Nov 2021 12:09:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 64EFC3857C71 Received: from AS9PR06CA0315.eurprd06.prod.outlook.com (2603:10a6:20b:45b::26) by DB9PR08MB6410.eurprd08.prod.outlook.com (2603:10a6:10:262::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Wed, 10 Nov 2021 12:09:14 +0000 Received: from AM5EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45b:cafe::fb) by AS9PR06CA0315.outlook.office365.com (2603:10a6:20b:45b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16 via Frontend Transport; Wed, 10 Nov 2021 12:09:14 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT027.mail.protection.outlook.com (10.152.16.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Wed, 10 Nov 2021 12:09:14 +0000 Received: ("Tessian outbound e7ce0d853b63:v108"); Wed, 10 Nov 2021 12:09:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 734b41ab29bed4fc X-CR-MTA-TID: 64aa7808 Received: from c91bad2c94e2.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D6A12B5B-0EFA-4485-BC23-110B63F00CC4.1; Wed, 10 Nov 2021 12:09:06 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c91bad2c94e2.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 10 Nov 2021 12:09:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e6zBSZi0CujpYLgIoiQEjPokTYeKbS4VKfNL9Ygx4fg0/qIwg8XmTPvfJo//v71jxd9+ZLJ6F7mx5rmhPpL0iAM+yHiO1yo0jVztN30xVvPrhD0/d4hw8CWoPRuuoq/83sTrY1LBqJ3VHXLWf3efrD2gAV2whR2ey4ZPwm4NfyASJVF1IijOnsowCfbIRu87GoiJrrQmBw4VGAPCbTK1X+D4Tb3XRwfi5RA/V72P+KDGe8ellkyM8IPBYkzNA/Amvrlvo1Pe50eL0d+Mq9lTy72JVXUPAuJPvqVWL6hVUrWU1ZsbPrl0MAU8wXMVza+Vc7QbUTZGmlmuaKULDpeptw== 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=wUqfLHjQ0V7B2rpPmc3fd67bswcNmp3AcmDTYqf/s00=; b=mQ3ctZUQQU6fGscS2SsoRMYfUjO5TsFXkR5Gjdyhi04PiIICC+r6Otf2ZSzz//yIa+8BXGx8BW15xpA0WgQLSFIvKbUe16yPqwnKqX0np4uDWWvp9ukXXG7PuAlgQmyInFUb+G+vQpKos5ekFxz8pSQv+Xj9rcxBh3nu/w/horBlfe4H/3Uxysr8uq8be2g/vDJZH0RHdE9R1ZMPBeUVSbCTE2wEqlLhpO5PNWTMxvVSNmwQ0OO0EMMELb97es0EKpbMWyd2sPkhF+x0Fh5Ke/DlQM4eopZCiR9OHs24F+VldEYbUOqzrsElS1694QVhZ+ABRzXrSE0kykSh3hqBpA== 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 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by VI1PR08MB3408.eurprd08.prod.outlook.com (2603:10a6:803:7c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 12:09:04 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::31cf:ea55:2234:c50b]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::31cf:ea55:2234:c50b%8]) with mapi id 15.20.4690.016; Wed, 10 Nov 2021 12:09:04 +0000 Date: Wed, 10 Nov 2021 12:08:55 +0000 To: gcc-patches@gcc.gnu.org Subject: [PATCH]AArch64 Remove shuffle pattern for rounding variant. Message-ID: Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: SN4PR0501CA0074.namprd05.prod.outlook.com (2603:10b6:803:22::12) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 Received: from arm.com (217.140.106.55) by SN4PR0501CA0074.namprd05.prod.outlook.com (2603:10b6:803:22::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.5 via Frontend Transport; Wed, 10 Nov 2021 12:09:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 198c5b55-c616-449b-e5c4-08d9a442e9a4 X-MS-TrafficTypeDiagnostic: VI1PR08MB3408:|DB9PR08MB6410: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 508CaX/awJ5NB1Hk0AhdEJJmg4EziAz44BKJALqdtF/dROCZ+bo5Y2DjPlCtggT98PpvfWcc2BE96t6lJ4Kw2o71wP10Z5z9seQ6ZdhY74YelhgiZJFi9WdBy/xZn4xW3XJGeb/TIUdV2RQnQ3YvLgAm1yfbuLPdcf08RcGWcmk8z91kQb+MVNLGHoe84wghP811LlaZa+fqS0WO8R7HZ+AB4mhEGBar9ZBoT4AKYF+EKnAQd7kSOF2tXVYCgeu0xdZukdT8a8dsGy4zb8skxiMV8H6Kn260Q0F3L80eFa92sewukoUZHrb7R5V44iJsnOhX8s3jJ2CfbnWekrMPazuY00ndXA2kmD4sLk1BD3OCQWns35Hk0J9pXJW57OafXATUE1OdV0f2x28PFs1K0cORPzSgvVJiYfbZ5B+QP0PI2uWJTLw3julYhoM9Zs1iGlI83nqXJBV9SysypDbRnleYaYdDT05wsDzkJ/zboX7S0Nf6+Y0HsFAhdumoEQxnTJrDqBJIjAe4bgKlMfFL59HeAVlNFbRY0wty0jKM4rVbGEMZThR7+KNPGV3cxC33k3SPA/tdIWXCxxYTzzNqfudP4ZPf0sNT6FUuzY6CFW9WVqJv/BpEy84+aOUOJP7MF0DNO6lDoerbFx6WxEUFsU2iI8tQF2Y/zQd8d94uDCMq47De1GNn2KcdckJ9gfuOJlsn/chMYceSWCtH9cHCNK9B9F5ozGMCGSsKrF3UuTCqnZ08KBOpeTWz6qchontxNnUkZH2eQ7zYq/PlpYBPtVZXnfKeU7/lmsbvQn482r+bbj+OFwJkkKxCxyyvSdC2YKHFDYoTmRumFQsU9Y+Fez5oyZNyQtBofAx5wAR/YLOWm+FxF6YmxlVwBrRRQdMe X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(83380400001)(2616005)(38100700002)(956004)(33964004)(66946007)(508600001)(4326008)(66476007)(38350700002)(66556008)(86362001)(7696005)(44832011)(36756003)(44144004)(52116002)(6916009)(6666004)(235185007)(2906002)(26005)(8886007)(316002)(5660300002)(8676002)(55016002)(8936002)(4743002)(186003)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3408 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: AM5EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 0bb76949-082b-4ef0-4801-08d9a442e359 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ljanHLkLNWb7C8VYT7k7pQD5yRnBwic9z1VSBPhWhE8WPpH7Pg2eqJbKeyzzplPTHPFKEp1tY/Ufn2yoQcwleZ6jqDQltIZW92LLhxIdzKsKUXBzBzoRRynLbMk1SkOQum3uFUoq5r5ZR8piAXU2drxuophOj9FL9tKSjxwUbi/WCtBQBHfnpHJoWxgDwlu2QAvDadykcH+se1RbUJ/WZFnl5VtconlLI6I9yDqkVXaDqeEn6NmzyD625Y7NfB63Vy1FnH9B3igOMR1qjWHM2g1AdZmPP0AaV0Vhmzwpo9St0ENJjFlgn3b04BTAHFNSo886mKkD2VQ6mX33IC0yzm/cIfwJ4+QihCJUAfgHnv62PTPnd4tZbhk6VhHDKRYLw67Nedl1O6POkbcJcu3rHs69Z2rVQf459xTm0lXAu2Me2hETGRmoF2vfI8fG+2giaGw/Ikf6JmD2MmKuj6r6KfMV/LDjb+n/GZNPkDtUPOtqSUL3wczcsCElqV7RetkJb9L5hnqPuXvqnsYG1rucO/1NZTouyLiUEjDzBrggJSQA2vbkMZuslOZDQ6XadovQeTlwmZQAyV2VGqgzrea24MQ2MCliB+A0jZLuI8xd9lw0Lo0WaZf+OMilpPPyMdlfv3HrZeggslJvN1P9QCDxJbn+sRKd3InVIRHEfYpjbazBFPrwAydTPOm5lf6oqPy4ksFWT/b3yg2xd0BJaJhO+27Ifkw9F3HafJro4F5ty0dw6C5oYDruD6CVzamw8ofbzzXKXySqg/1P3zjCmA4RA+4bqM1c9IBsOvtpZVEpdlMTDf2gVyLxIZ1bNDyP0T3g0ZEBttyvnmDf/hf81xhkDS4L0cbIO+fGAiurYnreZ22LunkaAvGpoZEX/S4bbIhy 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:(4636009)(46966006)(36840700001)(44144004)(26005)(7696005)(33964004)(186003)(4326008)(5660300002)(8676002)(2906002)(336012)(316002)(44832011)(235185007)(47076005)(956004)(2616005)(8936002)(86362001)(6666004)(508600001)(83380400001)(36756003)(4743002)(70586007)(8886007)(36860700001)(70206006)(356005)(82310400003)(6916009)(55016002)(81166007)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 12:09:14.3502 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 198c5b55-c616-449b-e5c4-08d9a442e9a4 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: AM5EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6410 X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_LOTSOFHASH, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tamar Christina via Gcc-patches From: Tamar Christina Reply-To: Tamar Christina Cc: Richard.Earnshaw@arm.com, nd@arm.com, richard.sandiford@arm.com, Marcus.Shawcroft@arm.com Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi All, This removed the patterns to optimize the rounding shift and narrow. The optimization is valid only for the truncating rounding shift and narrow, for the rounding shift and narrow we need a different pattern that I will submit separately. This wasn't noticed before as the benchmarks did not run conformance as part of the run, which we now do and this now passes again. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64-simd.md (*aarch64_topbits_shuffle_le ,*aarch64_topbits_shuffle_be): Remove. gcc/testsuite/ChangeLog: * gcc.target/aarch64/shrn-combine-8.c: Update. * gcc.target/aarch64/shrn-combine-9.c: Update. --- inline copy of patch -- diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index bff76e4b6e97db2613ab0ce1d721bf1828f0671b..c71658e2bf52b26bf9fc9fa702dd5446447f4d43 100644 diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index bff76e4b6e97db2613ab0ce1d721bf1828f0671b..c71658e2bf52b26bf9fc9fa702dd5446447f4d43 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -1887,22 +1887,6 @@ (define_insn "*aarch64_topbits_shuffle_le" [(set_attr "type" "neon_permute")] ) -(define_insn "*aarch64_topbits_shuffle_le" - [(set (match_operand: 0 "register_operand" "=w") - (vec_concat: - (unspec: [ - (match_operand:VQN 1 "register_operand" "w") - (match_operand:VQN 2 "aarch64_simd_shift_imm_vec_exact_top") - ] UNSPEC_RSHRN) - (unspec: [ - (match_operand:VQN 3 "register_operand" "w") - (match_dup 2) - ] UNSPEC_RSHRN)))] - "TARGET_SIMD && !BYTES_BIG_ENDIAN" - "uzp2\\t%0., %1., %3." - [(set_attr "type" "neon_permute")] -) - (define_insn "*aarch64_topbits_shuffle_be" [(set (match_operand: 0 "register_operand" "=w") (vec_concat: @@ -1917,22 +1901,6 @@ (define_insn "*aarch64_topbits_shuffle_be" [(set_attr "type" "neon_permute")] ) -(define_insn "*aarch64_topbits_shuffle_be" - [(set (match_operand: 0 "register_operand" "=w") - (vec_concat: - (unspec: [ - (match_operand:VQN 3 "register_operand" "w") - (match_operand:VQN 2 "aarch64_simd_shift_imm_vec_exact_top") - ] UNSPEC_RSHRN) - (unspec: [ - (match_operand:VQN 1 "register_operand" "w") - (match_dup 2) - ] UNSPEC_RSHRN)))] - "TARGET_SIMD && BYTES_BIG_ENDIAN" - "uzp2\\t%0., %1., %3." - [(set_attr "type" "neon_permute")] -) - (define_expand "aarch64_shrn" [(set (match_operand: 0 "register_operand") (truncate: diff --git a/gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c b/gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c index 6a47f3cdaee399e603c57a1c6a0c09c6cfd21abb..c93c179632156c07f05e6067e63804db35cc436b 100644 --- a/gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c +++ b/gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c @@ -6,7 +6,7 @@ uint8x16_t foo (uint16x8_t a, uint16x8_t b) { - return vrshrn_high_n_u16 (vrshrn_n_u16 (a, 8), b, 8); + return vshrn_high_n_u16 (vshrn_n_u16 (a, 8), b, 8); } /* { dg-final { scan-assembler-times {\tuzp2\t} 1 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c b/gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c index 929a55c5c338844e6a5c5ad249af482286ab9c61..bdb3c13e5a2f89d62b6a24c2abe3535656399cac 100644 --- a/gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c +++ b/gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c @@ -6,7 +6,7 @@ uint16x8_t foo (uint32x4_t a, uint32x4_t b) { - return vrshrn_high_n_u32 (vrshrn_n_u32 (a, 16), b, 16); + return vshrn_high_n_u32 (vshrn_n_u32 (a, 16), b, 16); } /* { dg-final { scan-assembler-times {\tuzp2\t} 1 } } */