This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] fma vs gcc 4.9
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 17 Jul 2014 14:12:23 +0000
- Subject: Re: [PATCH v2] fma vs gcc 4.9
- Authentication-results: sourceware.org; auth=none
- References: <53B59CDF dot 1010604 at twiddle dot net> <Pine dot LNX dot 4 dot 64 dot 1407162054010 dot 22313 at digraph dot polyomino dot org dot uk> <53C701C0 dot 70503 at twiddle dot net>
On Wed, 16 Jul 2014, Richard Henderson wrote:
> On 07/16/2014 01:56 PM, Joseph S. Myers wrote:
> > On Thu, 3 Jul 2014, Richard Henderson wrote:
> >
> >> It seems to me that there's a typo on that exact zero test: a2 should be used,
> >> not m2. Correct, or have I mis-read the code?
> >
> > The existing exact zero test seems correct to me. The conditions for such
> > an exact zero are that the result of the multiplication is exactly
> > representable in 53 bits (i.e., m2 == 0, with m1 being the exact result of
> > the multiplication), and that the result of the addition (of z to the high
> > part of the multipliation result) is an exact zero (i.e. a1 == 0, which
> > implies a2 == 0).
> >
>
> Thanks. This second version, then, does not s/m2/a2/, but merely adds the
> appropriate barriers. It also makes sure that m2 is complete before clearing
> inexact, even though I saw no evidence of it being scheduled after the call.
>
> Ok?
It seems ldbl-96/s_fma.c, ldbl-96/s_fmal.c and ldbl-128/s_fmal.c could all
have the same issue and so should have corresponding changes made.
--
Joseph S. Myers
joseph@codesourcery.com