This is the mail archive of the gcc-bugs@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]

[Bug target/56253] fp-contract does not work with SSE and AVX FMAs (neither FMA4 nor FMA3)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56253

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-08 13:30:14 UTC ---
(In reply to comment #3)
> (In reply to comment #1)
> 
> > not sure why we use builtins for these basic operations...
> 
> Because they have to be emitted also for non-SSE math.
> 
> From config/i386/sse.md:
> 
> ;; The standard names for fma is only available with SSE math enabled.
> (define_expand "fma<mode>4"
>   [(set (match_operand:FMAMODE 0 "register_operand")
>     (fma:FMAMODE
>       (match_operand:FMAMODE 1 "nonimmediate_operand")
>       (match_operand:FMAMODE 2 "nonimmediate_operand")
>       (match_operand:FMAMODE 3 "nonimmediate_operand")))]
>   "(TARGET_FMA || TARGET_FMA4) && TARGET_SSE_MATH")
> 
> ...
> 
> ;; The builtin for intrinsics is not constrained by SSE math enabled.
> 
> (define_expand "fma4i_fmadd_<mode>"
>   [(set (match_operand:FMAMODE 0 "register_operand")
>     (fma:FMAMODE
>       (match_operand:FMAMODE 1 "nonimmediate_operand")
>       (match_operand:FMAMODE 2 "nonimmediate_operand")
>       (match_operand:FMAMODE 3 "nonimmediate_operand")))]
>   "TARGET_FMA || TARGET_FMA4")

Ah, of course ...

That leaves the option of folding in targetm.fold_builtin (when
the standard names are available, of course).


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