------- Additional Comments From roger at eyesopen dot com 2005-02-19 05:41 ------- Re: comment #5 For floating point expressions, -(A+B) is only transformed into (-A)-B or (-B)-A when the user explicitly specifies -ffast-math, i.e. only when flag_unsafe_math_optimizations is true.
Re: comment #6 Interesting. Although on a handful of rs6000 cores (mpccore, 601 and 603), a fused-multiply-add is more expensive that an addition, its always a win to perform two fma's rather than a mult and two adds. It might be possible (with some work) to teach combine to un-CSE the following: double x; double y; void foo(double p, double q, double r, double s) { double t = p * q; x = t + r; y = t + s; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19988