From patchwork Thu Oct 17 13:21:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1998594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=gNLSOLUV; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=gNLSOLUV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XTpQt1gxXz1xvV for ; Fri, 18 Oct 2024 00:22:13 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4364F385840B for ; Thu, 17 Oct 2024 13:22:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2061a.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::61a]) by sourceware.org (Postfix) with ESMTPS id D66463858CD9 for ; Thu, 17 Oct 2024 13:21:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D66463858CD9 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 D66463858CD9 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2606::61a ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1729171308; cv=pass; b=Rz2vsVZuNy5KiE1gKJiO1dH+rQoTnqYn3LaCK7GBehzrbsZlso1ohEiBUsCxhTgEFDVHhLP9ou7RGJ2dK9k4bf1voGCKDL9Sa8Wdi6lLG3yPgSAEBYPeA7Oyez9dTEnY2QgOf85DhqT0/s3Roe3XUiq4y1KmLSSgMpvOOjM4HhY= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1729171308; c=relaxed/simple; bh=4KD0Z/S+MvLdPPxUwW8sveLRfenj1TckNkUFfpuQLUc=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=ZLW4Skv577bGWxc4hLBfjotL1hf5TsrjsIJLe0cpe5NMYpj27SzY9O2w4a8P6b7QdWjFYxdAl7+2IeFMZ4OMqzQzSSei2JzQ0Oj85KxP2czB45Iqr5l4Pz9o7hgKDeM5xJWBRJk5ZvNcGVMNq4R1L7BV66yCZoVifTlrQkTqKp4= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=IwqabbWi1q7s2YUwhGSd/Z+74IdBup0RBUifS9bGXdzxyIxkzBTr7JMxZ1TlWop7DQmQE7FqfYkGAa1gRfYkSiNezL+C/AvUcg6gy21JOkm1Wrq8UnRyKoCYghyh8JaFbc7kU4WAC3prkJVpcpl/fJnLPaO29d4tuq3mQZaioHAtBuQ9+ctz8AtIIbPUeBVqYM9QEBzZV7V29g1tFD5VRz8YF4oOsZskr0u0sJR1zCC3JWc5F0cIb5PwDz4h1027V5p2FWS4LnrHdhiY1nR5Mzrq/Fm8Z2S1LSQKrNBzTPcTGJYnvi/JDdQNSzsAY+rpGIC2t7B7jrclt7VpON9Nbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=WrEkr5EbzsAjZ871VYReTlba9qFqCerOfjL1vf7YDI0=; b=r42AIsQANLAGU3Tx+Zrut8LjnNIhZxEvvA+FrMer0QYudlJl8wi45wavKmjTEPhXlPChT2vc5p4l1+w6me775YdfBnGHAuwwnleA0uehgEejjHKp5yMkO3wVq7I7euFvBdOkGlCK+ejyI2VJKR1XgNOjoQw8opvtMKwXW59aAkDSccbehvPwwpoabsmJCBZxr/XdQVqTD8wBcr8XZYFe1g3PrSM0ooWeqgpAahfpob/6DHXLA5h2yC5ZJrHsS8FFnVxc+cOwOgT37RR43grPgfojaAuqju4VwDAMWN7B/hL3Ie78BaATo9IARXPpRl00VtG5Mz1qqmeyYdpwVYvH5w== 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=arm.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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WrEkr5EbzsAjZ871VYReTlba9qFqCerOfjL1vf7YDI0=; b=gNLSOLUV70K0Sie6SzmgJZjtQ7nxkjYIoIwXclBhlThuV6bwCbFa77qWiNBO6a4tOduWH2MFP8BM3B2kqrWAndUoIDRo+uICknmM1pRtU7exkgQ+TRQTxo7JiITR9Caj1H+5BMFYYOuDvg70gH1KuOGW2XplKjQcrrlBzBRQTy0= Received: from AM5PR0101CA0029.eurprd01.prod.exchangelabs.com (2603:10a6:206:16::42) by AS8PR08MB9145.eurprd08.prod.outlook.com (2603:10a6:20b:57c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Thu, 17 Oct 2024 13:21:33 +0000 Received: from AMS0EPF000001A4.eurprd05.prod.outlook.com (2603:10a6:206:16:cafe::ea) by AM5PR0101CA0029.outlook.office365.com (2603:10a6:206:16::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.19 via Frontend Transport; Thu, 17 Oct 2024 13:21: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=arm.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 AMS0EPF000001A4.mail.protection.outlook.com (10.167.16.229) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Thu, 17 Oct 2024 13:21:33 +0000 Received: ("Tessian outbound 40ef283ec771:v473"); Thu, 17 Oct 2024 13:21:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 43e34148db982ed1 X-TessianGatewayMetadata: XA7r5MY0TfkjGUB82boR0VvDdLqApx+vcPoYK88qUEdDxMmRMSgdhFLIXrWo4aTkMhXon9XY/P3c6R9XAUvMvKcH01/g0Ou76DJSDS47agHbNxI1VOpQmZHSxOkRx3IAV6CzP1wCFrf3GiBdfzoLZaLkmEr3yoJv7AYrzBh6xvVrYnsqKvxISU6P4+YFgbroOkquTy4juTiJSR4+1ifvmA== X-CR-MTA-TID: 64aa7808 Received: from L0f6a267628db.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BF7FB763-CDD4-4C4A-8A00-96DA17EB7BD2.1; Thu, 17 Oct 2024 13:21:25 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L0f6a267628db.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Oct 2024 13:21:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yjURwn0K/HQpG0V+WeF482PfKalV+WklH0FDJJyes74GObT5lAR2qO4X+rot5hXKcjnBoG5UEIRS46ngurOlHWFZhEbFEpVjMvZgN1SpBT8Zy/r6NcQsYbrjSA1RB0XsIxUb57Ut6bSpf+ah6fS6VNvUbiOi3SvyG9w9YAI8Mifh4FjBpbKyNeamD2WBx7CzMRbU+SrZP66YNg2QneTQ+br2HErnL1i4Qd1wbo0r4UspIk7Ab7sgBjdNtIpzsbi+d2TsV1hAOf+ZuSsCyTCxb0cxMMjpRB2uiasLyR2gdmYWkGzFZwihYZ4EpJ7nfMcHTT01xhr7E1jGBOnG60slWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=WrEkr5EbzsAjZ871VYReTlba9qFqCerOfjL1vf7YDI0=; b=Q7yCxeO7s1O/tIcHaBgaFTBZUoEx2dS1NP9oVCUxIjPvl74nGLxrOycyhYM5iwVwlD1oM4nYPoX+RVzCuJRwC10N2VmWlZ31tMpYcQFBAdidP2t5bjVM28drX+IJS7XM5BfjgkooXOwLnJoeYqXHdBUA34Atp1RBMtWXSsjtEGe+yRtdL5js3t1bKG0NsWN/M3vaLRjKuT/8GWQXxKSDDRuf8jMC4xWs1YKgvWSFAtKQOkLRrrFNjpeRH5mZbetG/4VotRncQP8CrX5OsXGGrrfsWgqFJxSPJ4onz4f88o+lnQTlWS12pD6dz5gMHnLRWxhP1SvcrcAnDWdmxklV6A== 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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WrEkr5EbzsAjZ871VYReTlba9qFqCerOfjL1vf7YDI0=; b=gNLSOLUV70K0Sie6SzmgJZjtQ7nxkjYIoIwXclBhlThuV6bwCbFa77qWiNBO6a4tOduWH2MFP8BM3B2kqrWAndUoIDRo+uICknmM1pRtU7exkgQ+TRQTxo7JiITR9Caj1H+5BMFYYOuDvg70gH1KuOGW2XplKjQcrrlBzBRQTy0= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by DB4PR08MB8150.eurprd08.prod.outlook.com (2603:10a6:10:382::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.20; Thu, 17 Oct 2024 13:21:21 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::b366:6358:236e:352d]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::b366:6358:236e:352d%5]) with mapi id 15.20.8048.030; Thu, 17 Oct 2024 13:21:21 +0000 From: Wilco Dijkstra To: Richard Sandiford CC: GCC Patches , Richard Earnshaw , "ktkachov@nvidia.com" Subject: [PATCH v3] AArch64: Fix copysign patterns Thread-Topic: [PATCH v3] AArch64: Fix copysign patterns Thread-Index: AQHbIJdFtowJMJeQdE2B14dnr7b+mA== Date: Thu, 17 Oct 2024 13:21:21 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAWPR08MB8982:EE_|DB4PR08MB8150:EE_|AMS0EPF000001A4:EE_|AS8PR08MB9145:EE_ X-MS-Office365-Filtering-Correlation-Id: 17c03ff1-0455-4943-d754-08dceeae9eb2 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; X-Microsoft-Antispam-Message-Info-Original: =?iso-8859-1?q?YwBqfknoE36eriL1v?= =?iso-8859-1?q?cPW39si/QYoT9UKtg6WfDLMQ52r6T7RoYUBLiHObe5bckCpw7lozubS++ve6?= =?iso-8859-1?q?Bxm3iJZ+yhdy4S6f7eSxVR/iB5UzyeHa0tujyGm+mkFlqBUXL+FZtX2JIBQC?= =?iso-8859-1?q?ORHPNHGc9Ercyxz9f4ozyXSaiYT00xKZtHLzhxCWfSiqi6FU/7PYRtdjVBDi?= =?iso-8859-1?q?BJW2kCrjv0tWgTSJ96P4jJ8C/T0BaZdVAtjK0CRxLqR3IC6V7bgnH4fBMzFT?= =?iso-8859-1?q?d1/GFLolBUCcF47trRyiOQAj1PIQSnDKohugDQ2Dxh3WS7HHEtrkiyFBtVer?= =?iso-8859-1?q?SxOEeAmXHUL+XVLAEWarYrT88aWfqnc788l2xmhE6FyHmT4mVbYakOibE9TS?= =?iso-8859-1?q?dhhtkumRviyJdQOwnaOVSRhnEyIvs+QhLrMN2ssU5AGOAcpY/SSxLKY5NF42?= =?iso-8859-1?q?jUojXs5LmiYwuRlR82jBERsUFRALNQijagk8IyM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ACf?= =?iso-8859-1?q?hHuGSai6OhMYqG4o3iyT+G+IgCDuw=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8982.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB8150 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-SkipListedInternetSender: ip=[2603:10a6:102:33f::20]; domain=PAWPR08MB8982.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001A4.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 69e4c87e-c6a1-4521-9ddf-08dceeae977d X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026|35042699022; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?UGmDniIp6RbkRbRE89ZQ0SIl1Z?= =?iso-8859-1?q?1s3u5yv9U+vkNhoYQNZuH274hXqlCNgdifS6X6FLqRY+LwG5SNiJAktV+xFM?= =?iso-8859-1?q?h6/6Qm/3eKL24NDJ1nTR8wcCaDJolHjAYLSYPrE2G/GowRHqC2kCKjY6dzql?= =?iso-8859-1?q?vNKGyBFvsQemmtnDXMuMPHqpvBtsK163ZLPhJi10fEpO952DKV0V3eqDa35X?= =?iso-8859-1?q?Ofcsg4Mu/9/uS0pn3opxuBFPspPAWrbumpvBSC4JEAgm9aVn26H9YxgWK9SM?= =?iso-8859-1?q?5qTx1thTfbDBN5guTavd042Mr1+Y1kTpn8mSIaAcTf9+XP9yN9GpU1DEHXIk?= =?iso-8859-1?q?LekN2aSwr02u3/Encxyw6AA8sFg9ta/lU2rC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iso-8859-1?q?RLxhCua30MpPNLOrlwfS272pc+TGdZVSygFZ9Rlc+OhjWtljSSgoddZckb03?= =?iso-8859-1?q?Xq5LDJP9+PzjwWlDkvnWL1h1pP0ISLabtX6Zf/B59Ch3rcJNLpxq7rd2Lax3?= =?iso-8859-1?q?VV3s9eWcUN6Aeuc1XbJvxAgNlE9euhqpPZ9sryQBc=3D?= 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:(13230040)(376014)(36860700013)(1800799024)(82310400026)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2024 13:21:33.3227 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17c03ff1-0455-4943-d754-08dceeae9eb2 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: AMS0EPF000001A4.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9145 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, KAM_SHORT, SPF_HELO_PASS, SPF_NONE, TXREP, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The current copysign pattern has a mismatch in the predicates and constraints - operand[2] is a register_operand but also has an alternative X which allows any operand. Since it is a floating point operation, having an integer alternative makes no sense. Change the expander to always use vector immediates which results in better code and sharing of immediates between copysign and xorsign. Passes bootstrap and regress, OK for commit? gcc/Changelog: * config/aarch64/aarch64.md (copysign3): Widen immediate to vector. (copysign3_insn): Use VQ_INT_EQUIV in operand 3. * config/aarch64/iterators.md (VQ_INT_EQUIV): New iterator. (vq_int_equiv): Likewise. testsuite/Changelog: * gcc.target/aarch64/copysign_3.c: New test. * gcc.target/aarch64/copysign_4.c: New test. * gcc.target/aarch64/fneg-abs_2.c: Fixup test. * gcc.target/aarch64/sve/fneg-abs_2.c: Likewise. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index c54b29cd64b9e0dc6c6d12735049386ccedc5408..71f9743df671b70e6a2d189f49de58995398abee 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -7218,20 +7218,11 @@ (define_expand "lrint2" } ) -;; For copysign (x, y), we want to generate: +;; For copysignf (x, y), we want to generate: ;; -;; LDR d2, #(1 << 63) -;; BSL v2.8b, [y], [x] +;; movi v31.4s, 0x80, lsl 24 +;; bit v0.16b, v1.16b, v31.16b ;; -;; or another, equivalent, sequence using one of BSL/BIT/BIF. Because -;; we expect these operations to nearly always operate on -;; floating-point values, we do not want the operation to be -;; simplified into a bit-field insert operation that operates on the -;; integer side, since typically that would involve three inter-bank -;; register copies. As we do not expect copysign to be followed by -;; other logical operations on the result, it seems preferable to keep -;; this as an unspec operation, rather than exposing the underlying -;; logic to the compiler. (define_expand "copysign3" [(match_operand:GPF 0 "register_operand") @@ -7239,32 +7230,25 @@ (define_expand "copysign3" (match_operand:GPF 2 "nonmemory_operand")] "TARGET_SIMD" { - rtx signbit_const = GEN_INT (HOST_WIDE_INT_M1U - << (GET_MODE_BITSIZE (mode) - 1)); - /* copysign (x, -1) should instead be expanded as orr with the sign - bit. */ + rtx sign = GEN_INT (HOST_WIDE_INT_M1U << (GET_MODE_BITSIZE (mode) - 1)); + rtx v_bitmask = gen_const_vec_duplicate (mode, sign); + v_bitmask = force_reg (mode, v_bitmask); + + /* copysign (x, -1) should instead be expanded as orr with the signbit. */ rtx op2_elt = unwrap_const_vec_duplicate (operands[2]); + if (GET_CODE (op2_elt) == CONST_DOUBLE && real_isneg (CONST_DOUBLE_REAL_VALUE (op2_elt))) { - rtx v_bitmask - = force_reg (V2mode, - gen_const_vec_duplicate (V2mode, - signbit_const)); - - emit_insn (gen_iorv23 ( - lowpart_subreg (V2mode, operands[0], mode), - lowpart_subreg (V2mode, operands[1], mode), + emit_insn (gen_ior3 ( + lowpart_subreg (mode, operands[0], mode), + lowpart_subreg (mode, operands[1], mode), v_bitmask)); DONE; } - - machine_mode int_mode = mode; - rtx bitmask = gen_reg_rtx (int_mode); - emit_move_insn (bitmask, signbit_const); operands[2] = force_reg (mode, operands[2]); emit_insn (gen_copysign3_insn (operands[0], operands[1], operands[2], - bitmask)); + v_bitmask)); DONE; } ) @@ -7273,23 +7257,21 @@ (define_insn "copysign3_insn" [(set (match_operand:GPF 0 "register_operand") (unspec:GPF [(match_operand:GPF 1 "register_operand") (match_operand:GPF 2 "register_operand") - (match_operand: 3 "register_operand")] + (match_operand: 3 "register_operand")] UNSPEC_COPYSIGN))] "TARGET_SIMD" {@ [ cons: =0 , 1 , 2 , 3 ; attrs: type ] [ w , w , w , 0 ; neon_bsl ] bsl\t%0., %2., %1. [ w , 0 , w , w ; neon_bsl ] bit\t%0., %2., %3. [ w , w , 0 , w ; neon_bsl ] bif\t%0., %1., %3. - [ r , r , 0 , X ; bfm ] bfxil\t%0, %1, #0, } ) - -;; For xorsign (x, y), we want to generate: +;; For xorsignf (x, y), we want to generate: ;; -;; LDR d2, #1<<63 -;; AND v3.8B, v1.8B, v2.8B -;; EOR v0.8B, v0.8B, v3.8B +;; movi v31.4s, 0x80, lsl 24 +;; and v31.16b, v31.16b, v1.16b +;; eor v0.16b, v31.16b, v0.16b ;; (define_expand "@xorsign3" diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index 1322193b027c9ad1d45d5b5ebbeea0e8537615d3..a1ea66048b2a5066381194779ff4d2998228d8f7 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -1889,6 +1889,14 @@ (define_mode_attr v_int_equiv [(V8QI "v8qi") (V16QI "v16qi") (VNx8SF "vnx8si") (VNx16SF "vnx16si") ]) +;; Mode with floating-point values replaced by 128-bit vector integers. +(define_mode_attr VQ_INT_EQUIV [(DF "V2DI") (SF "V4SI") +]) + +;; Lower case mode with floating-point values replaced by 128-bit vector integers. +(define_mode_attr vq_int_equiv [(DF "v2di") (SF "v4si") +]) + ;; Floating-point equivalent of selected modes. (define_mode_attr V_FP_EQUIV [(VNx8HI "VNx8HF") (VNx8HF "VNx8HF") (VNx8BF "VNx8HF") diff --git a/gcc/testsuite/gcc.target/aarch64/copysign_3.c b/gcc/testsuite/gcc.target/aarch64/copysign_3.c new file mode 100644 index 0000000000000000000000000000000000000000..be48682420f1ff84e80af9efd9d11f64bd6e8052 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/copysign_3.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +float f1 (float x, float y) +{ + return __builtin_copysignf (1.0, x) * __builtin_copysignf (1.0, y); +} + +double f2 (double x, double y) +{ + return __builtin_copysign (1.0, x) * __builtin_copysign (1.0, y); +} + +/* { dg-final { scan-assembler-times "movi\t" 2 } } */ +/* { dg-final { scan-assembler-not "copysign\tw" } } */ +/* { dg-final { scan-assembler-not "dup\tw" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/copysign_4.c b/gcc/testsuite/gcc.target/aarch64/copysign_4.c new file mode 100644 index 0000000000000000000000000000000000000000..f3cec2fc9c21a4eaa3b6556479aeb15c04358a1c --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/copysign_4.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=armv8-a+sve" } */ + +float f1 (float x, float y) +{ + return __builtin_copysignf (1.0, x) * __builtin_copysignf (1.0, y); +} + +double f2 (double x, double y) +{ + return __builtin_copysign (1.0, x) * __builtin_copysign (1.0, y); +} + +/* { dg-final { scan-assembler-times "movi\t" 1 } } */ +/* { dg-final { scan-assembler-times "mov\tz" 1 } } */ +/* { dg-final { scan-assembler-not "copysign\tw" } } */ +/* { dg-final { scan-assembler-not "dup\tw" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/fneg-abs_2.c b/gcc/testsuite/gcc.target/aarch64/fneg-abs_2.c index 18d10ee834d5d9b4361d890447060e78f09d3a73..9fe8e9bde6965875816e2aa722c36028ac233198 100644 --- a/gcc/testsuite/gcc.target/aarch64/fneg-abs_2.c +++ b/gcc/testsuite/gcc.target/aarch64/fneg-abs_2.c @@ -9,7 +9,7 @@ /* ** f1: -** orr v[0-9]+.2s, #?128, lsl #?24 +** orr v[0-9]+.4s, #?128, lsl #?24 ** ret */ float32_t f1 (float32_t a) diff --git a/gcc/testsuite/gcc.target/aarch64/sve/fneg-abs_2.c b/gcc/testsuite/gcc.target/aarch64/sve/fneg-abs_2.c index fe08fe31fe87aab4a7ce8497d05488a42fe9ae21..cc97c95d1521be6693f3182b485bab2aa4b1daa0 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/fneg-abs_2.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/fneg-abs_2.c @@ -7,7 +7,7 @@ /* ** f1: -** orr v0.2s, #?128, lsl #?24 +** orr v0.4s, #?128, lsl #?24 ** ret */ float32_t f1 (float32_t a)