This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Fix tree-optimization/55524

Quoting Richard Biener <>:

On Mon, Apr 8, 2013 at 5:10 PM, Joern Rennecke
<> wrote:
This is basically the same patch as attached to the PR, except that I
have changed the goto-loop into a do-while loop with a new comment;
this caused the need for a lot of reformatting.

Can you please include a testcase that shows the effect of this?

FWIW, the assembler is simpler to understand if you add the compilation
option -mfp-mode=round-nearest.
Without the patch, you then get:

        fmul r1,r1,r3
        mov r3, %low(#-2147483648)
        movt r3, %high(#-2147483648)
        eor r1,r3,r1
        fmadd r1,r0,r2
        mov r0,r1

And with the patch:

        fmul r0,r0,r2
        fmsub r0,r1,r3

2013-04-08  Joern Rennecke  <>

        * tree-ssa-math-opts.c (mult_to_fma_pass): New file static struct.
        (convert_mult_to_fma): In first pass, don't use an fms construct
        when we don't have an fms operation, but fmna.

it's fnma I believe.

Oops, yes, typo.  The patch itself has the right spelling.
2013-03-09  Joern Rennecke <>

	* New test.

---	(revision 0)
+++	(working copy)
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "fmsub\[ \ta-zA-Z0-9\]*," 1 } } */
+f (float ar, float ai, float br, float bi)
+  return ar * br - ai * bi;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]