From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id D5837385741A for ; Fri, 9 Sep 2022 12:41:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D5837385741A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,303,1654588800"; d="scan'208";a="85488122" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 09 Sep 2022 04:41:04 -0800 IronPort-SDR: uVd72JyP9zTK4pyjhqxMvtNYr8/zGaz8Li6snh4FXuWj2VuIMXnGv2IjRe1oxTwS4tMzHRYwqT zQHZMf5PSn4eW8Z43fiXJWNvUL0papNQ3hnOc9hZULMnjijSnhWglgQJMjzd/Ttwzcz5Awpp49 mRNj9SruxjnUj+dgXZkm4wGw1g29o7MS6K52fldskqnpT8PPrn6NarlHqP8IzD0XPAcgpKaVsm Kj5H1UBzjJF46OjHbVaTlcGDOHoBxU1Unhq4ZHUVzQKs3PPODagAB6scVViFgEhiclpeWOepMS MBk= Message-ID: Date: Fri, 9 Sep 2022 13:40:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: GCN: Add -mlow-precision-sqrt for double-precision sqrt [PR105246] (was: Re: [PATCH] amdgcn: Add support for additional natively supported floating-point operations) Content-Language: en-GB To: Tobias Burnus CC: Kwok Cheung Yeung , gcc-patches , Richard Biener References: <08966068-719a-30d1-5b71-7cf839e507e7@codesourcery.com> <5d7ca95c-8a61-6d07-dd5b-e7c2d03072ff@codesourcery.com> From: Andrew Stubbs In-Reply-To: <5d7ca95c-8a61-6d07-dd5b-e7c2d03072ff@codesourcery.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 09/09/2022 13:20, Tobias Burnus wrote: > However, the pre-existing 'sqrt' problem still is real. It also applies > to reverse sqrt ("v_rsq"), but that's for whatever reason not used for GCN. > > This patch now adds a commandline flag - off by default - to choose > whether this behavior is wanted. I did use the same name as aarch64, > https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#index-mlow-precision-sqrt (the latter also has -mlow-precision-recip-sqrt, which is not (yet) sensible for GCN.) > > This patch was manually tested for all combinations and I also looked at > insn-recog.cc, given that it is my first .md patch – it it seems to work > fine. > > OK for mainline – or are there comments or more suggestions? I also > included some word for the release notes. No, thank you. I don't see any value in adding an option no one cares about (but we still have to maintain and test). I think it will make sense to drop the double-precision insn definition and fall back to libm in that case. Kwok is currently reviewing all the libm functions and can probably include this one. Andrew