This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/56253] fp-contract does not work with SSE and AVX FMAs (neither FMA4 nor FMA3)
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 08 Feb 2013 13:30:14 +0000
- Subject: [Bug target/56253] fp-contract does not work with SSE and AVX FMAs (neither FMA4 nor FMA3)
- Auto-submitted: auto-generated
- References: <bug-56253-4@http.gcc.gnu.org/bugzilla/>
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).