From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id A57A3388B683; Thu, 15 Dec 2022 18:28:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A57A3388B683 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.96,248,1665475200"; d="scan'208";a="89698525" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 15 Dec 2022 10:28:25 -0800 IronPort-SDR: Dwk5SMrFxWaheNbKjpgpRNfXBt0pLLsaeRvoUlWTHLYkIBDS9M+aEiuayuNv5x5TO3jXz57bCx 4z2g7YHjFkD3VqO+H6LF2+AbvXusY2XnMFkGsrjniuHzzSif4NP8Pr92ZIbxyyOzFWhfQZsFpY t8Hpn+EOct7eu9uEkenqhG1G2V2DWvtfovZpCCnvpf91AFy0XAD/8+wqtuIsQY0wSsNJ3oI7Bp 5squi9d+PWD/gNApzKFqFDiiVm00WCdSlGv1OLALFb5QGwW5wJCElS1uLCcf/MVASnPbhuqKMw XQg= Date: Thu, 15 Dec 2022 18:28:19 +0000 From: Joseph Myers To: Kewen.Lin CC: Jakub Jelinek , Michael Meissner , , Segher Boessenkool , Peter Bergner , David Edelsohn , Will Schmidt , William Seurer Subject: Re: [PATCH 2/3] Make __float128 use the _Float128 type, PR target/107299 In-Reply-To: Message-ID: References: <6b7325c6-6416-d64f-89a8-7341aeb8226c@linux.ibm.com> <3cbaa3d2-4327-c62a-2904-eac5ca506d20@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3109.2 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no 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 Thu, 15 Dec 2022, Kewen.Lin via Gcc-patches wrote: > By investigating the exposed NaN failures, I found it's due to that it wants > to convert _Float128 type constant to long double type constant, it goes > through function real_convert which clears the signalling bit in the context > of !HONOR_SNANS (arg). > > if (r->cl == rvc_nan) > r->signalling = 0; > > The test cases don't have the explicit option -fsignaling-nans, I'm inclined > to believe it's intentional since there is only a sNaN generation. If so, > we don't want this kind of conversion which is useless and can clear signalling > bit unexpectedly, one shortcut is to just copy the corresponding REAL_VALUE_TYPE > and rebuild with the given type if the modes are the same. I think this approach - treating floating-point conversions to a type with the same mode consistently as a copy rather than a convertFormat operation - is reasonable. -- Joseph S. Myers joseph@codesourcery.com