From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12814 invoked by alias); 19 Feb 2005 05:41:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12785 invoked by uid 48); 19 Feb 2005 05:41:39 -0000 Date: Sat, 19 Feb 2005 16:58:00 -0000 Message-ID: <20050219054139.12784.qmail@sourceware.org> From: "roger at eyesopen dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050215225352.19988.stevenj@fftw.org> References: <20050215225352.19988.stevenj@fftw.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/19988] [4.0 Regression] pessimizes fp multiply-add/subtract combo X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg02225.txt.bz2 List-Id: ------- 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