From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10075.outbound.protection.outlook.com [40.107.1.75]) by sourceware.org (Postfix) with ESMTPS id BDF8D385840B for ; Fri, 12 Nov 2021 11:48:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BDF8D385840B Received: from AS8P251CA0012.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::33) by DBBPR08MB6010.eurprd08.prod.outlook.com (2603:10a6:10:20a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Fri, 12 Nov 2021 11:48:55 +0000 Received: from VE1EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2f2:cafe::4e) by AS8P251CA0012.outlook.office365.com (2603:10a6:20b:2f2::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Fri, 12 Nov 2021 11:48:55 +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 VE1EUR03FT054.mail.protection.outlook.com (10.152.19.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.20 via Frontend Transport; Fri, 12 Nov 2021 11:48:54 +0000 Received: ("Tessian outbound 9292a5a778a6:v109"); Fri, 12 Nov 2021 11:48:54 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 12b9736cfa80627d X-CR-MTA-TID: 64aa7808 Received: from 97e6adce2ce6.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0A1B865A-1B3A-41B9-9748-11D8B84DE4A9.1; Fri, 12 Nov 2021 11:48:46 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 97e6adce2ce6.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 Nov 2021 11:48:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WOOUOoMepA0N/SSFAEw54tHYICuKINx5MLL4hdZusSCrY3+wgdGZDOlpJlzV7e+sxWPMJWL1YXF9ZrFYE5r0UM4VxxeYMdC3+4472IGJ9aElGD61nyJ132dtPDztrqnu5NJneS6ai3r7ie8NhvhqLF92hoH3hAObvTSGV1gQHeocdYJJQtXUPARdXyHcWn3n96BzhEVzwIaun9PIugMnnzH9rm6QaSlCrc7cBGi3bhNUWGlER48UbQtq1ttYd16rkB1ZLAVlwDFQRIoXVRgj6YDSNGx6rR+dNINKp7q/HZBXR7nnYp0gXHiFOcp87KrLCVhZbzQqenoEh/Juq5+WaA== 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=Gzxo6W7aKSZpjtBKMfe4hLzo0lliTvvIf3d7BjGGr3c=; b=Q/isrddqq2sW0ceiS8OPdD4MvpGYPVjp+Pj0dsUReMy6wELuSLiJMxcWC3KXCOAmGxK8gSSd5F1YYx9WlUKaA7CJDIt7OUNAJmcnSVOTm4Gvq/huWbGXUPpgI/vIOHKfSR3DdGhsbAA4HEnosqzu7/d+iIuWrpH4haE2cVrb+ITlxs54LAyz/6vkjDYHogaDCzP7jukOIARu2c5MlbXtL1aqgZ6kAH7ptlMrCzPh8WnXTagdWtG0ZxTSVB5DskNj4uaEALOUe0Jojr61UTP7ccprsJX3LfWpVcVO8t570oy2x91VZjKrIzpTflnKqCsDRK4Oh25fYxJmjaHMmA5n3Q== 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 AM6PR08MB4231.eurprd08.prod.outlook.com (2603:10a6:20b:73::23) by AM6PR08MB5173.eurprd08.prod.outlook.com (2603:10a6:20b:e5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19; Fri, 12 Nov 2021 11:48:45 +0000 Received: from AM6PR08MB4231.eurprd08.prod.outlook.com ([fe80::c085:c93c:e46d:80a]) by AM6PR08MB4231.eurprd08.prod.outlook.com ([fe80::c085:c93c:e46d:80a%6]) with mapi id 15.20.4690.016; Fri, 12 Nov 2021 11:48:45 +0000 Message-ID: <36e3469a-3922-d49e-4006-0088eac29157@arm.com> Date: Fri, 12 Nov 2021 11:48:52 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [AArch64] Enable generation of FRINTNZ instructions Content-Language: en-US To: Richard Biener Cc: "gcc-patches@gcc.gnu.org" , Richard Sandiford References: <8225375c-eb9e-f9b3-6bcd-9fbccf2fc87b@arm.com> <70s9nn94-452-5rrr-4458-q6n3qp563652@fhfr.qr> From: Andre Simoes Dias Vieira In-Reply-To: <70s9nn94-452-5rrr-4458-q6n3qp563652@fhfr.qr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0402.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:f::30) To AM6PR08MB4231.eurprd08.prod.outlook.com (2603:10a6:20b:73::23) MIME-Version: 1.0 Received: from [192.168.1.9] (81.101.15.202) by LO2P265CA0402.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:f::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Fri, 12 Nov 2021 11:48:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3712a7d-8a6d-4157-b04c-08d9a5d2677b X-MS-TrafficTypeDiagnostic: AM6PR08MB5173:|DBBPR08MB6010: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Ym/M0Fdi7YM2ra6UE/veqFvmf5YH+uAugsnPZNiJKTDG0+xtWZy0Q6jvRHgGHHqcMtlRcj69m6aVhIxiYbfwxB/6yG5/U61fRV6Q8Od+KEWZEzNhBd9ZXkz5lZCm47Xh+nGXbsn1kFn+dpFc3gFRe+/BXZCMffsCfFtaCGAolWrfsIuH6J+QH50jMgUu3F389yTmrMymUNw9iV7mNifX6QUwUDgadUU9n20x7y6rUqrFE/YZAIEl6kvNKxwdTP0QeisttmJRi1y89P+pM/FM4QF6g26W+FtGkwlaAoauUdXDYhftJ7XehZngBt7fkPwllNhAM1v7QBaJ+5NNWnPjXwHMz8mBwiUzn/g/3/ldJUJqS55VFqJfPkwkQTTvcPq27Rn6cNEqgmTRaSnKN1nq0S09xVQlZ9tCTHx+mzkUiDxju5KEUwomrVG/AdnQuWpx+FUsUu3+MDlyZv/ev46bcxOIa0phaY1pfNpNVQzbI1pmlofQkzsX0d0PDtM+D/R50742AumWlYLVAS2TKeKnCMSTD98GPIzW33L0cp/iSLhoBSYe7IzSlQuqyhXbLWzu2TFBlqhsDw7sKDQbJNGDLqFoyKAJifA27T56mAdu1OugrjTMiYNV/70qxk2Y0PakKSh95gb84UCYKLUzq/N+OfsQT3N4NRXOJnha5ejcTCGmfbgwFwTThgbuQtPuQpiT5KCd+SYMLhLyX02rphOt/0IFMjpmcwb6zjriuZNtHVXr897ejppik3MEere0usi3f+0dNblRCFwZEvtYfYXqog== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB4231.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(6486002)(86362001)(8676002)(508600001)(38100700002)(53546011)(38350700002)(52116002)(6916009)(186003)(4326008)(54906003)(31696002)(316002)(16576012)(83380400001)(36756003)(6666004)(26005)(2906002)(5660300002)(66556008)(66946007)(66476007)(2616005)(956004)(8936002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5173 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: VE1EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: af89ca0a-c85b-465f-4cce-08d9a5d26182 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M6S4khHEkaxkRa6CUvHz/R1Sm7CgRD/Ck5BEBleVepqpXaTaDgHibiA5EJmubC7rCNV/SCXn1iWZfBrMhQC7uf8T169GdnSiAlDNP5T+WkoXF1IHnDe+Om7jhDhT2V5RCtefUkalFlrPOlTd8x2VNPFXOsLIiWfU104HVR5hpfuInRTgtxtRPHPwo063ijLIUrvFXxpEBwWVp66W5Fwk8ruITSqVZo5VtcIxIBqskgauHrh+9QVV/Wujsd0V59Ks+ykdsvb8wvYgmtfEaeKUq3XVrRt0OU2EIpcd7CEn3Eicq07fL9vyThfI+3zICtnI+hy6kscUVV03vrTBpEDmKuSHXIjHfQvOhtkW5WGRuAf93eSe0QAWTm0szhezs70MD0cyKeB6GF0bbT7XbXlgMVY87jbW1qo9Bg8b0tZXZCBEa8ty+/gh/gJhW0HL6sKGnWWfQ4c4ZfAbunN9OmhfKI1XPv5ckLo86WgrEEvBX+Jyh/oeX833l1SaUGXftlmqCkAl6NxTeG2s3OE4TPJOlrrbzez5GAeUbF4FvIxZk3CTSKM/fB3xD9qYwE11+GhBo8SKCTObiKMj59YArUpBK1qfffpNlunDlejNjMPKvZLXOcH3eyy38dTvBPlcHQYmJ+UCluBB5Pl5+t8YuXGfQxNkp4YeJauviLiRQxykeMgcPOt2vlBUkFk6g7t0SP+mwjPS0m07IeMxgfXTgvbnmvlPX4Orcqnj/8YO/+WBzDs= 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)(36840700001)(46966006)(6862004)(186003)(31696002)(26005)(8676002)(336012)(8936002)(36756003)(6666004)(956004)(2616005)(36860700001)(6486002)(82310400003)(5660300002)(4326008)(70206006)(316002)(54906003)(70586007)(16576012)(2906002)(83380400001)(86362001)(31686004)(47076005)(81166007)(53546011)(508600001)(356005)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2021 11:48:54.6460 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3712a7d-8a6d-4157-b04c-08d9a5d2677b 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: VE1EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6010 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, 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-List-Received-Date: Fri, 12 Nov 2021 11:49:00 -0000 On 12/11/2021 10:56, Richard Biener wrote: > On Thu, 11 Nov 2021, Andre Vieira (lists) wrote: > >> Hi, >> >> This patch introduces two IFN's FTRUNC32 and FTRUNC64, the corresponding >> optabs and mappings. It also creates a backend pattern to implement them for >> aarch64 and a match.pd pattern to idiom recognize these. >> These IFN's (and optabs) represent a truncation towards zero, as if performed >> by first casting it to a signed integer of 32 or 64 bits and then back to the >> same floating point type/mode. >> >> The match.pd pattern choses to use these, when supported, regardless of >> trapping math, since these new patterns mimic the original behavior of >> truncating through an integer. >> >> I didn't think any of the existing IFN's represented these. I know it's a bit >> late in stage 1, but I thought this might be OK given it's only used by a >> single target and should have very little impact on anything else. >> >> Bootstrapped on aarch64-none-linux. >> >> OK for trunk? > On the RTL side ftrunc32/ftrunc64 would probably be better a conversion > optab (with two modes), so not > > +OPTAB_D (ftrunc32_optab, "ftrunc$asi2") > +OPTAB_D (ftrunc64_optab, "ftrunc$adi2") > > but > > OPTAB_CD (ftrunc_shrt_optab, "ftrunc$a$I$b2") > > or so? I know that gets somewhat awkward for the internal function, > but IMHO we shouldn't tie our hands because of that? I tried doing this originally, but indeed I couldn't find a way to correctly tie the internal function to it. direct_optab_supported_p with multiple types expect those to be of the same mode. I see convert_optab_supported_p does but I don't know how that is used... Any ideas?