On Thu, 22 Dec 2022, Segher Boessenkool wrote:

> 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 :-)

The purpose was to ensure that _Float128's TYPE_PRECISION was at least as 
large as that of long double, in the case where they both have binary128 
format.  I think at that time, in GCC 7, it was possible for _Float128 to 
be KFmode and long double to be TFmode, with those being different modes 
with the same format.

In my view, it would be best not to have different modes with the same 
format - not simply ensure types with the same format have the same mode, 
but avoid multiple modes with the same format existing in the compiler at 
all.  That is, TFmode should be the same mode as one of KFmode and IFmode 
(one name should be defined as a macro for the other name, or something 
similar).  If you don't have different modes with the same format, many of 
the problems go away.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to