This is the mail archive of the gcc-patches@gcc.gnu.org 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: rs6000 fused multiply-add patch


Geoffrey Keating wrote:
> 
> I looked at Segher's patch, and while I thought it was the right
> direction, I kept finding more missing pieces the more I looked at
> it.  So, I wrote my own.  This one has test cases, documentation, and
> works in nearly every case.

Mine works in _every_ case -- I _did_ test it, after all :)

I didn't test your patch yet, but...

> --- config/rs6000/rs6000.md     16 Nov 2002 18:01:51 -0000      1.222
> +++ config/rs6000/rs6000.md     3 Dec 2002 02:32:41 -0000
> @@ -5280,7 +5280,18 @@
>         (neg:SF (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f")
>                                   (match_operand:SF 2 "gpc_reg_operand" "f"))
>                          (match_operand:SF 3 "gpc_reg_operand" "f"))))]
> -  "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD"
> +  "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
> +   && HONOR_SIGNED_ZEROS (SFmode)"
> +  "fnmadds %0,%1,%2,%3"
> +  [(set_attr "type" "fp")])
> +
> +(define_insn ""
> +  [(set (match_operand:SF 0 "gpc_reg_operand" "=f")
> +       (minus:SF (mult:SF (neg:SF (match_operand:SF 1 "gpc_reg_operand" "f"))
> +                          (match_operand:SF 2 "gpc_reg_operand" "f"))
> +                        (match_operand:SF 3 "gpc_reg_operand" "f")))]
> +  "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD
> +   && ! HONOR_SIGNED_ZEROS (SFmode)"
>    "fnmadds %0,%1,%2,%3"
>    [(set_attr "type" "fp")])

We're not supposed to add duplicate patterns to the .md -- that's what started
all of this, after all?


Segher


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