This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR libgcc/59714 complex division is surprising on aarch64


On Wed, 25 Oct 2017, vladimir.mezentsev@oracle.com wrote:

> On 10/25/2017 10:28 AM, Joseph Myers wrote:
> > On Wed, 25 Oct 2017, vladimir.mezentsev@oracle.com wrote:
> >
> >> +# Disable FMA (floating-point multiply-add) instructions for complex division.
> >> +# These instructions can produce different result if two operations executed separately.
> >> +LIBGCC2_FFP_CONTRAST_CFLAGS = -ffp-contract=off
> >> +LIB2_DIV3_FUNCS = _divdc3 _divhc3 _divsc3
> > Without regard to whether the change is appropriate in the first place, 
> > I'm doubtful of the logic for selecting floating-point modes.  I'd expect 
> > something that applies to all floating-point modes.  Even if nothing has 
> > fused XFmode operations, some architectures (e.g. s390, powerpc) have 
> > fused operations on TFmode / KFmode.
> 
>    Hello Joseph and GCC-team,
> Different people are giving me different directions.
> I am glad to change my fix but please provide clear directions on how
> you want to see it.

I am unconvinced of the need for a change that reduces accuracy in some 
cases to make things less surprising in other cases.

I am clear that if there is to be such a change, it should be made 
consistently for all affected floating-point modes, including TFmode / 
KFmode where available, since those have fused operations on some 
platforms.

-- 
Joseph S. Myers
joseph@codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]