This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] Fix PR28684
- From: Revital1 Eres <ERES at il dot ibm dot com>
- To: Clint Whaley <whaley at cs dot utsa dot edu>, roger at eyesopen dot com
- Cc: Ayal Zaks <ZAKS at il dot ibm dot com>, Dorit Nuzman <DORIT at il dot ibm dot com>, gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, whaley at cs dot utsa dot edu
- Date: Wed, 15 Nov 2006 18:52:28 +0200
- Subject: Re: [RFC] Fix PR28684
Following Clintâs recent notes, I returned to the former definition
of the flag (if no one objects) and tried to clarify the
Allow optimization for floating-point arithmetic which are IEEE
compliant but may not follow language standards by reordering
the operations and/or commuting operands.
This means that the result may be changed due to rounding issues.
For example; in transforming (a + b) + c to a + (b + c) the intermediate
calculations still follow IEEE standard but the result could be different
due to rounding which also make the final result different.
This flag intended for applications that need to be IEEE compliant
and would like to benefit from some transformations at the price of
loss of accuracy. Among the transformations that are enabled by this
flag are vectorization, mve and re-association.
An example of a transformation which is not allowed by this flag is
transforming x * 0 to 0 as the result is not IEEE compliant when x
NOTE: may reorder or strength reduce floating-point comparisons as
well, and so may not be used when ordered comparisons are required.
I thought that because reciprocal transformations involves division
it may be separated from -fassociative-math:
Same as -fassociative-math for expressions which include division.
For example x / y can be replaced with x * (1/y)
which is useful if (1/y) is subject to common subexpression
By this definition a*(b/c) -> (a*b)/c should be applied with
as it involves division.
It seems that -fassociative-math does not honor signed zero for different
rounding modes, is that o.k. ?
Comments are welcome.