From patchwork Mon Sep 30 11:45:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1990914 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=QQ9kpNSM; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=QQ9kpNSM; 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 4XHK6S2yBkz1xsq for ; Mon, 30 Sep 2024 21:46:38 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 146C4386100D for ; Mon, 30 Sep 2024 11:46:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2060e.outbound.protection.outlook.com [IPv6:2a01:111:f403:2608::60e]) by sourceware.org (Postfix) with ESMTPS id 5211B386076B; Mon, 30 Sep 2024 11:46:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5211B386076B 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 5211B386076B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2608::60e ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1727696776; cv=pass; b=qDsHmZfd8bSg5X7dNtYQi1lyZmSEcne7fI6guHno43BHCVYX+hJCbfrgx0ZZdmCpBqmDqsJC2dKZAmDOun42Idbo9avDaATIgXd/rnxX+Obo2c+zahabL0Mlli1EQVw1g2STDGnG+3wrrc0f5VGEalkksOc4fpMJstr4ZmOkFZs= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1727696776; c=relaxed/simple; bh=YayhoCyQkJw1Qh0N4dpdNi2b9FOMI5Rs8fHb+eZmS34=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=ePmT7Id6HV4P/W+XLp+zjXbzGyEVrPHTq6Gpo4L/zRg7B32qI+tcDxWFPE8HtVRqWXIppBgHzMINIflwpXCoGeaml3U6SXmlCuUjb25CJtfEdJMztbgq3QC5Z4d4kJ/n4PME9Gh7COE7d6Wir3Si4/qaesrsSKPeW8p9mJQHchI= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=TQ7ZrS7nPtWg6LRTySxq04eMYCrEpiTSXNAKg+O4ZeY1q22AZZwyfP0jjoIp3A43vv0ivFr7aHzg3oAIM75mk+0uXDJVLaQOrGdEFDdccwRtaRHFFp9v0+l1ZiQ3pcfIs0LUcW0bOJdfR3OC/dtzXt7iIlYj9t2A1v0jckuyasJTFhBHD/g81S3vpOJhc3g5HpqBNZAvZpauocuvh/SxW9iosAmkYaMWeSG4/DoLRWfGvgxfoBjagxyrtfVhHwXRgNd+o4RhyIy/H1qU5OPPX1fbN5x8NQbCnM5AXX9SzTsqbJnOXWMds67cbyM8l8Dy11mFf1IkQWYlabE+l3M2Hw== 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=XQjts52bIlIaqA/ZW7sB76OYW0PJbOV0bfoRS5aeFZY=; b=J8fDkWMJRxocATa9be3Xdv3Yh5h1VSAPQeqpcDHHxin87nDIqpQe0mOs9TIkhncXohXqrJnrvjuXNlhuT5R1eS0yOvk1W1XD0O8R7eVcHuFaKMMwj81Z0+YdGNYjfItOkyqZFYPV8NZ6voHw4zPCoiBmPykY76YftFeTYBWGGja4O/Emz0oyMQmAiQQlvADtsJe/owO1j7x7KEDRnW8S//w3vqpUqOajGWpmpaGgOMLLY5YWcEvc128+fxX648XVItUIn9HQTYCjr2sjpOYSw+OIsXSibl7E6MyOmKGidEycJ0UyAeLSvmdDGRI8piGAqXc0ls9HpQoImnqRKwruDw== 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=XQjts52bIlIaqA/ZW7sB76OYW0PJbOV0bfoRS5aeFZY=; b=QQ9kpNSMHCqn7y8G6qI+eE41SSH5pGn4QlVWOrJyR1C386FtkNg05BeinEkL2I7wWMDaljhkMvwG1k2hbw1U0HmnDRMNI+Jp1wq9vCOm9ZTLF/NcEQp4EeuG2SMlkKBr2FYRkBbwUWpEHSyux6CeA1EmIbeDMSRJI2vRlMEsnWU= Received: from DUZP191CA0071.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4fa::11) by GV1PR08MB10955.eurprd08.prod.outlook.com (2603:10a6:150:1f0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.13; Mon, 30 Sep 2024 11:46:08 +0000 Received: from DB1PEPF000509F1.eurprd03.prod.outlook.com (2603:10a6:10:4fa:cafe::ea) by DUZP191CA0071.outlook.office365.com (2603:10a6:10:4fa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26 via Frontend Transport; Mon, 30 Sep 2024 11:46:07 +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 DB1PEPF000509F1.mail.protection.outlook.com (10.167.242.75) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8026.11 via Frontend Transport; Mon, 30 Sep 2024 11:46:06 +0000 Received: ("Tessian outbound 82567588fe42:v470"); Mon, 30 Sep 2024 11:46:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d390437c79c25b07 X-TessianGatewayMetadata: ziZkqxJbd1itinZNltuGK0bD5rRk+R6m5ujn5QHUQVV5oKxBKQCK1mjBZ6e39AdZH5NI1K3JSwY+03D9sn9fwi/4J+dL4sD8KTleufiVlct1mvuEVaSp5X7wwLAO4P5FJMGB1m9YGKixchRqvmohSQ== X-CR-MTA-TID: 64aa7808 Received: from L8fc4a94e382d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 65C04831-B6C2-4EE9-A3A9-D3657D022812.1; Mon, 30 Sep 2024 11:45:59 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L8fc4a94e382d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 30 Sep 2024 11:45:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rB+FbhNjIdtocUZisyRbmGY0BJ1PM4cdn/kne5d/9uxjY6ImKPGW9xG3zhePeYL27k255N85xW39mTMUQdcF/1w+JrCvRvo3Kf+s2n6SK+n5ioHLSJBYpwCSg9QbP35S79XIK1GcSQbrD8hhZpWxyorZB5l5sZa9NnDAcsLC9xtnOydchjFJArXhLrjx+FTUXMb0+r5YrPaIX+WDXNw88bgbAic2R81rWaUcxw/3j1M+HdR9cPjQ24C6ZVQ2wkkML3lX7A9fRF38wXAlUohHYggSchdqWKHT5p0qQ+P0FqjB5pqnLaE0bMy9XDxe3MwnvqbU3ERaEmheSs7FejlbUg== 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=XQjts52bIlIaqA/ZW7sB76OYW0PJbOV0bfoRS5aeFZY=; b=EazOT45VvZfcK2Eie2IRASkhTYpkc9uHmTUVtlZjtUmWvqz+yfCsz/sVUadwvIIDKpIWTHZX9WJPsOFFUOvQ3MwihXVZC1Y8XZMxGbksLTIEWqeB6kUbOEIedzeRBFNt8fIss3f60fGoy+pwYYPIt8y2iBhRoNgkYqM2nvk4VgdKmK5feY141jU79y4ydDcnJ8kRpz4R7Jz1kuOYaFIRBi5w9tre3rpQZh3mjufE4OLMVXkQ6Qy+1mjBBC7L2+Ml+UHARxEObOPfdiLXrkP//lQ1gsN3CpEYVrVowds8deaoCRxjOJg+5QACAxXGPidsoqsWNuogVPgB23DEPulGzQ== 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=XQjts52bIlIaqA/ZW7sB76OYW0PJbOV0bfoRS5aeFZY=; b=QQ9kpNSMHCqn7y8G6qI+eE41SSH5pGn4QlVWOrJyR1C386FtkNg05BeinEkL2I7wWMDaljhkMvwG1k2hbw1U0HmnDRMNI+Jp1wq9vCOm9ZTLF/NcEQp4EeuG2SMlkKBr2FYRkBbwUWpEHSyux6CeA1EmIbeDMSRJI2vRlMEsnWU= 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 AS2PR08MB10010.eurprd08.prod.outlook.com (2603:10a6:20b:64a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.13; Mon, 30 Sep 2024 11:45:56 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69%7]) with mapi id 15.20.8026.009; Mon, 30 Sep 2024 11:45:55 +0000 Date: Mon, 30 Sep 2024 12:45:53 +0100 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, Richard.Earnshaw@arm.com, Marcus.Shawcroft@arm.com, ktkachov@gcc.gnu.org, richard.sandiford@arm.com Subject: [PATCH 1/2]AArch64: refactor aarch64_float_const_representable_p to take additional mode param Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P265CA0016.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::10) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|AS2PR08MB10010:EE_|DB1PEPF000509F1:EE_|GV1PR08MB10955:EE_ X-MS-Office365-Filtering-Correlation-Id: 14850123-e8a0-486c-675b-08dce145782d x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info-Original: hbob1DIoKXI7v4tmtX/x9LmFlOqP7dqe374dxnjEQuvftuF8F9fPIaiQUpiNwlEUDfALlzkWJvGZZKLMtgaXqPjaW4bw+IZ+ZrUhKHw32mVFchqRaSeOARXzM8Vm5Un2WEmZ43AQkbTmaEieNzc0XEkGr7lM0oJ8tOPP47sXysq8UrKm7vs7lTHqekLJti6SOP8jlnFp+5FvMufPIWO6zQB1DU+YStEdaCbRKvOr4jr4n6xhN44lUtl6VkLEE5ajt3/OBB14Ygfq3iZ9ufhamlLU5mIx779JCE5WA3mKlIkGXCML94VaNfVlhJ67xrSBjSTi8Qo4YxyZJNU26EDfG5VcZSBkBSr3BXJSGZlpl8GeJLxc8es9FXZHcM0IlRS0oVr9+V5uGYzPsn1UFG7AMxdZjhGob3CW//8RgwY7ZMOZNUMKPSeBV8t1neVyqtVCcv6vTFZ2llKj63K07HDW6trpXnYDgVP6bOlNgiBKNCRzx/PY/tbukhDH/iLWyWHe1OIRH5aKCOcGiaoU7z52Q1HOb69xJDszsf6cHVoG6PeCz5iMCn4o5agv0AteO+eEfv+r72oVUBZ+sXRpsgSKW9v7VCmzXSl9R5xnuPZc2uIIIUSGiOwNN01UsuFz6aeMDS432K7jT9WvfNu8OXExKO5nOES9HXZW1Wmz0QES1BedBxNzl3NNRPofpeF0Qfp0Huo0EkFX3rJJBWilqo9UUfzjAm2Ls694aVTvPKA7JNm/80y+SCU9kxFAGcg+4qrY+yVvpolLH+uZ+rQzdi2kXPUttPOKoaYrlFpjdcOGN9XkYeN2ES91BpkwpfFW+O0MwtkUhZofcttqn23YZLSHrA2bKFdH7/BFgqOo7TOedfhV4BHqz9fKeGc0Mk53aNgHHNzcq0hyc/Jq8C+Sblo+szxI+gtL0hN2suKEoHQzRq/Dfvd1r8mGEEDz7c9Z8RBKmQketakoFrWpM/cdM4fDBMxqY6+llLrVpUUgtLIfNYPcSkey1VBc204nJVp3qmF0lRbOrA090Y8A5VY+U2aQjqVnxkIBIkMFcdqlhVYsUDtAz9TY0cBZ1rATQFdL8ZcxYbDIbdb6Khzaq450aB5x+q6m6/nLeMbVysstbhLo+n6LYSvJ7074WmyOCCubDvrZH7lhZqyNBtDDSg+dPK04s4hNDywldyc6upPugS5LdRi+iprlhrLUQlqQBbGDTim40f3VGGezpP7hOq7yCp26SHKsNbh4+HVSugheonxr0DDxLHFCuPhka7jPFm/R5G+WRohU1CIpvX9dY9ugMCzH+vzY+kT+3/R381H4lLV3qBBNMKpRYCa/HkiU65WZ+oocbaMGEgOFZMKUK4k3R/ontw== 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:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB10010 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:803:13e::17]; domain=VI1PR08MB5325.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509F1.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 21dd15b2-731c-47d0-3133-08dce14571a8 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|35042699022|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?X+fh2ZdqAklraMOc1CwP48tDGjE5rdh?= =?utf-8?q?sb85Y4D3CuoVZxMqMcBj9yrMc88eQ2O3TpPWfdE0ZugVwWIGul+ZG9bEB727c5IIq?= =?utf-8?q?t6M0Eu4M7svPJlXDcu6crNu1eiPWEIS4jEy74fgj5FUtkAT6ii9IJYeiDU5NxY91M?= =?utf-8?q?eEY1EQJfrCYAzciROnMF8twB9MzemODbcCys70foWExzXuAtzax+jcWTV3D8yzuvp?= =?utf-8?q?21AxTFjcpn8OXYq/LVaefMUK/7nA9ojz5qrXdEZAXHR62dtx4v5fHeYKuDJJNkPPP?= =?utf-8?q?JxrIKS96wIOG2ebcrekG/3ffZfAs5rQzCuHqbNlX9M1i69kfnsZjVZB2SJIfBavWr?= =?utf-8?q?Wx34LNSX4XoFi/60AYo2ufd5hkhBQaRbssU1UAVwzcxOHGZVpIkIi//eHZs0DC+8b?= =?utf-8?q?zj/LMoitRiCCnKbDWlCdRBwKzK/FGUf1VnZzfxHKUkc4DPd3kZ7j5KuEBR78Yvokf?= =?utf-8?q?KnUn6TDpyKwhMIDYdnFRK4TF7TsQH4Tj4TE/0msEm1VOarmQlxJ8Rc+Q1AQeP345m?= =?utf-8?q?EFjV09wiM9YtU2Rt5/UlMvJ6yw6tkaSSsWlqhcYPx1Rc1js/43Qv60ctiKZsbaerB?= =?utf-8?q?If7DUoBIRytV8kheF13xHOomgT9+V/QQIRcDdsIugJphGewU2A+T7Pf1ZWIwvIHNW?= =?utf-8?q?C6arPebD/MXIWSFRP5yt0So2wB/echCAMeAUWIasefS7jJvn46RQM/4cnx9k37efk?= =?utf-8?q?5DVekCUdb8nQAzW7Q5Vy/BQyt5VYOYJEL8bsNv9a9+BgAA73BWFBJ3lgyW7X2HU3P?= =?utf-8?q?MUHvaglAJU7hbcr2U4IgKRh+L2p53B97J28/57+ySre4TS5cU10eDYKmfP0h9jy3r?= =?utf-8?q?ADLnE0fTlE8YqdbGhBi45u4RGoixytR/fR9JigFuIs2Y1ticYlVuGkBFN5+qRX9Zt?= =?utf-8?q?xiLcJNKlNKEq9vV2/Cq6TFc6AlYi6UrzT0HJMoofCZmOzmm33FEldoFDOH7+YR+CH?= =?utf-8?q?vJicfWAXi5O2eBXfuxMy0OUh3s7bAjzUoUAKYvaFpyW5LboqRmMxaQYhWtIUBMwSY?= =?utf-8?q?Hzz1KP5UQQnthb0UhExYYcdS+lJMgx92UyT0oHZzr3ksaaAf+2VndlNbOK2uwf3nn?= =?utf-8?q?CMx3Zyks1uV86AjC4sQBRgOIEHaES/qVHWCUsM4uKEMnVnpzSQ3+i3l4AyU5UskYn?= =?utf-8?q?emq/5uU1/qehfhFCOcNVT/jpE6FWcXmPMOilaR/kd9goI8g+bdczmB6t7sr5+ad+k?= =?utf-8?q?URWA+dvqKqK2SQxLZpNf5N90wVt68O225nH0KrEeM1aDd5jUzPkTTz+q2FNjnG7gl?= =?utf-8?q?z4VRtiLSm3WWed1+f/zCpMtgXqgLMxJsjavfNHL9L0hX9q2RuuPAfu5QQ12igInkB?= =?utf-8?q?TDp8kw+s0bxA?= 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)(82310400026)(376014)(1800799024)(35042699022)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 11:46:06.4846 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 14850123-e8a0-486c-675b-08dce145782d 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: DB1PEPF000509F1.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB10955 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, 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 Hi All, This is a refactoring to allow aarch64_float_const_representable_p to take an additional mode parameter which is the mode of the constant being analyzed. This will be required by the next patch in the series. No functional change is expected from this change. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64-protos.h (aarch64_float_const_representable_p): Add mode param. * config/aarch64/aarch64.cc (aarch64_float_const_representable_p): Add mode param. (aarch64_print_operand, aarch64_rtx_costs, aarch64_simd_valid_immediate): Use it. * config/aarch64/aarch64.md: Likewise. * config/aarch64/constraints.md: Likewise. * config/aarch64/predicates.md: Likewise. --- -- diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index d03c1fe798b2ccc2258b8581473a6eb7dc4af850..7a84acc59569da0b50af2300615db561a5de460a 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -973,7 +973,7 @@ bool aarch64_mov128_immediate (rtx); void aarch64_split_simd_move (rtx, rtx); /* Check for a legitimate floating point constant for FMOV. */ -bool aarch64_float_const_representable_p (rtx); +bool aarch64_float_const_representable_p (rtx, machine_mode); extern int aarch64_epilogue_uses (int); diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 68913beaee2092d65279801c362d6e742269b3c4..1842f6ecf6330f11a64545d0903240c89b104ffc 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -12317,7 +12317,7 @@ aarch64_print_operand (FILE *f, rtx x, int code) fputc ('0', f); break; } - else if (aarch64_float_const_representable_p (x)) + else if (aarch64_float_const_representable_p (x, GET_MODE (x))) { #define buf_size 20 char float_buf[buf_size] = {'\0'}; @@ -14233,7 +14233,7 @@ aarch64_rtx_costs (rtx x, machine_mode mode, int outer ATTRIBUTE_UNUSED, /* First determine number of instructions to do the move as an integer constant. */ - if (!aarch64_float_const_representable_p (x) + if (!aarch64_float_const_representable_p (x, mode) && !aarch64_can_const_movi_rtx_p (x, mode) && aarch64_float_const_rtx_p (x)) { @@ -14252,7 +14252,7 @@ aarch64_rtx_costs (rtx x, machine_mode mode, int outer ATTRIBUTE_UNUSED, if (speed) { /* mov[df,sf]_aarch64. */ - if (aarch64_float_const_representable_p (x)) + if (aarch64_float_const_representable_p (x, mode)) /* FMOV (scalar immediate). */ *cost += extra_cost->fp[mode == DFmode || mode == DDmode].fpconst; else if (!aarch64_float_const_zero_rtx_p (x)) @@ -23032,7 +23032,7 @@ aarch64_simd_valid_immediate (rtx op, simd_immediate_info *info, { rtx elt = CONST_VECTOR_ENCODED_ELT (op, 0); if (aarch64_float_const_zero_rtx_p (elt) - || aarch64_float_const_representable_p (elt)) + || aarch64_float_const_representable_p (elt, elt_mode)) { if (info) *info = simd_immediate_info (elt_float_mode, elt); @@ -25119,10 +25119,10 @@ aarch64_c_mode_for_suffix (char suffix) 'n' is an integer in the range 16 <= n <= 31. 'r' is an integer in the range -3 <= r <= 4. */ -/* Return true iff X can be represented by a quarter-precision +/* Return true iff X with mode MODE can be represented by a quarter-precision floating point immediate operand X. Note, we cannot represent 0.0. */ bool -aarch64_float_const_representable_p (rtx x) +aarch64_float_const_representable_p (rtx x, machine_mode mode) { /* This represents our current view of how many bits make up the mantissa. */ @@ -25133,11 +25133,12 @@ aarch64_float_const_representable_p (rtx x) bool fail; x = unwrap_const_vec_duplicate (x); + mode = GET_MODE_INNER (mode); if (!CONST_DOUBLE_P (x)) return false; - if (GET_MODE (x) == VOIDmode - || (GET_MODE (x) == HFmode && !TARGET_FP_F16INST)) + if (mode == VOIDmode + || (mode == HFmode && !TARGET_FP_F16INST)) return false; r = *CONST_DOUBLE_REAL_VALUE (x); @@ -25150,7 +25151,7 @@ aarch64_float_const_representable_p (rtx x) return false; /* For BFmode, only handle 0.0. */ - if (GET_MODE (x) == BFmode) + if (mode == BFmode) return real_iszero (&r, false); /* Extract exponent. */ diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index c54b29cd64b9e0dc6c6d12735049386ccedc5408..20e131403071b6cf68aa06c0df7c90ef9c656cae 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -1712,7 +1712,7 @@ (define_split (match_operand:GPF_HF 1 "const_double_operand"))] "can_create_pseudo_p () && !aarch64_can_const_movi_rtx_p (operands[1], mode) - && !aarch64_float_const_representable_p (operands[1]) + && !aarch64_float_const_representable_p (operands[1], mode) && !aarch64_float_const_zero_rtx_p (operands[1]) && aarch64_float_const_rtx_p (operands[1])" [(const_int 0)] diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md index f491e4bd6a069bc9f8a3c71bdec14496c862a94d..ce30133bc8270b44bfb5495cc3fba004c2deb3c9 100644 --- a/gcc/config/aarch64/constraints.md +++ b/gcc/config/aarch64/constraints.md @@ -447,7 +447,7 @@ (define_constraint "Ufc" "A floating point constant which can be used with an\ FMOV immediate operation." (and (match_code "const_double,const_vector") - (match_test "aarch64_float_const_representable_p (op)"))) + (match_test "aarch64_float_const_representable_p (op, mode)"))) (define_constraint "Uum" "A constant that can be used with the U[MIN/MAX] CSSC instructions." diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md index 8f3aab2272c62d5dcc06dfd14fd00067e4db6b8e..5bb162c0888582572587363e0292dd22d5cdb65d 100644 --- a/gcc/config/aarch64/predicates.md +++ b/gcc/config/aarch64/predicates.md @@ -888,7 +888,7 @@ (define_predicate "aarch64_sve_vsm_immediate" (define_predicate "aarch64_sve_dup_immediate" (and (match_code "const,const_vector") (ior (match_test "aarch64_sve_dup_immediate_p (op)") - (match_test "aarch64_float_const_representable_p (op)")))) + (match_test "aarch64_float_const_representable_p (op, mode)")))) (define_predicate "aarch64_sve_cmp_vsc_immediate" (and (match_code "const_int,const_vector")