[RFC] Fix PR28684
Revital1 Eres
ERES@il.ibm.com
Mon Nov 13 13:01:00 GMT 2006
Hello,
Regarding PR28684 - we were re-thinking of the current definition of the
flags
(-fassociative\reciprocal-math) and decided that instead of thinking of
those flags in terms of arithmetic laws we refer to their semantics.
Thus -fassociative-math will be defined as follows:
-fassociative-math:
Allow optimization for floating-point arithmetic which may change the
result of the operation due to rounding.
NOTE: may reorder or strength reduce floating-point comparisons as
well, and so may not be used when ordered comparisons are required.
For example x + x + x can be transformed to 3 * x.
Because reciprocal transformations involves division
it was separated from -fassociative-math and defined as follows:
-freciprocal-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 elimination.
Attached is the patch (before testing).
I would like to thanks Richard Guenther for his help.
Comments are welcome.
Revital
(See attached file: patch_associative)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_associative
Type: application/octet-stream
Size: 16839 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061113/2d7764f7/attachment.obj>
More information about the Gcc-patches
mailing list