From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 3A60B3858D1E for ; Thu, 22 Dec 2022 18:19:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A60B3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 2BMIIC10005944; Thu, 22 Dec 2022 12:18:12 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 2BMIIB1S005943; Thu, 22 Dec 2022 12:18:11 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 22 Dec 2022 12:18:11 -0600 From: Segher Boessenkool To: Joseph Myers Cc: "Kewen.Lin" , GCC Patches , Michael Meissner , David Edelsohn , Jakub Jelinek , Peter Bergner , Richard Biener , Richard Sandiford Subject: Re: [RFC/PATCH] Remove the workaround for _Float128 precision [PR107299] Message-ID: <20221222181811.GV25951@gate.crashing.org> References: <718677e7-614d-7977-312d-05a75e1fd5b4@linux.ibm.com> <20221221212407.GU25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,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: Hi! On Wed, Dec 21, 2022 at 09:40:24PM +0000, Joseph Myers wrote: > On Wed, 21 Dec 2022, Segher Boessenkool wrote: > > > --- a/gcc/tree.cc > > > +++ b/gcc/tree.cc > > > @@ -9442,15 +9442,6 @@ build_common_tree_nodes (bool signed_char) > > > if (!targetm.floatn_mode (n, extended).exists (&mode)) > > > continue; > > > int precision = GET_MODE_PRECISION (mode); > > > - /* Work around the rs6000 KFmode having precision 113 not > > > - 128. */ > > > > It has precision 126 now fwiw. > > > > Joseph: what do you think about this patch? Is the workaround it > > removes still useful in any way, do we need to do that some other way if > > we remove this? You didn't address these questions. We don't see negative effects from removing this workaround, but it isn't clear (to me) what problems were there that caused you to do this workaround. Do you remember maybe? Or can we just delete it and try to forget such worries :-) > I think it's best for the TYPE_PRECISION, for any type with the binary128 > format, to be 128 (not 126). Well, but why? Of course it looks nicer, and it is a gross workaround to have different precisions for the different 128-bit FP modes, more so if two modes are really the same, but in none of the ways floating point precision is defined would it be 128 for any 128-bit mode. > It's necessary that _Float128, _Float64x and long double all have the same > TYPE_PRECISION when they have the same (binary128) format, Yes, agreed. Or even if it would be not necessary it is the only sane thing to do. Segher