This is the mail archive of the
mailing list for the GCC project.
Re: IEEE 754 and fused-madd (was: Re: patch: rs6000 specific)
- From: tm at kloo dot net (tm)
- To: dalej at apple dot com (Dale Johannesen)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 7 Dec 2001 14:06:47 -0800 (PST)
- Subject: Re: IEEE 754 and fused-madd (was: Re: patch: rs6000 specific)
> All right, so I need to generate additional FMA patterns by modifying
> Our FP expert says all the required transformations are IEEE-compliant.
> Before I get too far into it, does anybody want to dispute this? Here are
> the patterns. The claim is that each of them can be transformed safely
> into the first one in its group.
> A*C + B
> B + A*C
> -(A*C - B)
> ((-A)*C) + B
> -((-B) + A*C)
> B - A*C
> A*C -B
> -B + A*C
> -(B - A*C)
> -((-A)*C + B)
> -(A*C + B)
> ((-A)*C) -B
> (-B) - A*C
> -(B + A*C)
Maybe I'm being too pedantic, but is this the right place
to do this transformation?
For example, if you have:
B - A * C
B - A * D
then combine will convert these to:
-(A * C - B)
-(A * D - B)
but since CSE has already run, the negation of B will
occur twice...or is this already handled somehow?