This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Simplify floating point conversions
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, aj at suse dot de
- Date: Tue, 5 Nov 2002 09:38:00 -0800
- Subject: Re: Simplify floating point conversions
- References: <20021105171400.GX14655@kam.mff.cuni.cz>
On Tue, Nov 05, 2002 at 06:14:00PM +0100, Jan Hubicka wrote:
> Hi,
> this patch makes us to simplify some of the floating point operations to
> narrower mode when conversions are present. This include
> +,-,/,*,abs,neg,sqrt/sin/cos/exp.
> I believe it is IEEE safe, but some expert would be welcome.
You should have commented this. It should not take someone 5
minutes to even figure out what's going on here. To be sure, it's
(float)sqrtl(x) -> sqrtf((float)x)
correct? Well, clearly this fails for X = 2**(127 * 2), since
X is not representable as a float, but its square root is. It
would not be hard to identify similar problems with every other
operation on your list except for ABS/NEG.
r~