This is the mail archive of the
mailing list for the GCC project.
Re: Having the -mfused-madd option honored
- From: "Michael Meissner" <michael dot meissner at amd dot com>
- To: "Serge Torres" <Serge dot Torres at ens-lyon dot fr>
- Cc: gcc-help at gnu dot org
- Date: Thu, 8 Nov 2007 17:23:31 -0500
- Subject: Re: Having the -mfused-madd option honored
- References: <4731C61D.firstname.lastname@example.org>
On Wed, Nov 07, 2007 at 03:05:17PM +0100, Serge Torres wrote:
> I'm using gcc 4.1.2 on an openPower 720 (Power5 processors) box running
> Linux OpenSUSE 10.2.
> I would like to compile a C program with the fused multiply-add and
> multiply-sub instructions enabled. I can't figure out the right set of
> I've been trying many combinations of -mcpu=power5, -mhard-float,
> -mfused-madd, -m64 but none has worked yet.
> An idea any one? Or even better: a personnal successful experience.
> Serge Torres
> PS : IBM XL V 9 works (as matter of fact, with no particular option)
Just to be sure, have you compiled the program with optimization (such as -O,
-O2, or -O3)? The GCC combiner that builds up complex insns like multiply and
add is only run when optimizing. I happen to have a PowerPC cross compiler
built from a few weeks ago, and it generates fmadd and fmadds instructions if I
use -mcpu=power5 and -mfused-madd.
Michael Meissner, AMD
90 Central Street, MS 83-29, Boxborough, MA, 01719, USA