This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] soft-fp: Fix used without set warning in _FP_MUL and_FP_DIV
- From: David Miller <davem at davemloft dot net>
- To: rth at twiddle dot net
- Cc: libc-alpha at sourceware dot org, joseph at codesourcery dot com
- Date: Fri, 07 Dec 2012 14:38:34 -0500 (EST)
- Subject: Re: [PATCH] soft-fp: Fix used without set warning in _FP_MUL and_FP_DIV
- References: <1354907985-14082-1-git-send-email-rth@twiddle.net>
From: Richard Henderson <rth@twiddle.net>
Date: Fri, 7 Dec 2012 13:19:45 -0600
> Seen in, e.g. ports/sysdeps/alpha/soft-fp/ots_mul.c.
>
> The problem here is we have a switch on the class of X*Y, followed by
> a switch on the class of R. The exponent field of R really is not set
> by the first switch for NaN outputs, because we know it's not going to
> be used. The compiler is not smart enough to see through this.
>
> By pulling the exponent computation out of the NORMAL*NORMAL path, we
> will not be pessimizing the most common case, while still providing an
> arbitrary value to satisfy the compiler.
> ---
> ChangeLog | 6 ++++++
> soft-fp/op-common.h | 4 ++--
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> Ok to commit?
This is fine, thanks Richard.