https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97142

--- Comment #11 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to luoxhu from comment #10)
> If not built with fast-math, gimple_has_side_effects will return true and
> cause the expand_call_stmt fail to expand the "_1 = fmod (x_2(D), y_3(D));"
> to internal function. X86 also produces "bl fmod" for O3 build.
>  
> 
> xlF expands the fmod to below ASM, no FMA generated?
> 
> 
> 0000000010000900 <ggl>:
>     10000900:   8c 03 01 10     vspltisw v0,1
>     10000904:   00 00 24 c8     lfd     f1,0(r4)
>     10000908:   00 00 03 c8     lfd     f0,0(r3)
>     1000090c:   e2 03 40 f0     xvcvsxwdp vs2,vs32
>     10000910:   c0 09 62 f0     xsdivdp vs3,vs2,vs1
>     10000914:   80 19 80 f0     xsmuldp vs4,vs0,vs3
>     10000918:   64 21 a0 f0     xsrdpiz vs5,vs4
>     1000091c:   88 2d 01 f0     xsnmsubadp vs0,vs1,vs5
>     10000920:   18 00 20 fc     frsp    f1,f0
>     10000924:   20 00 80 4e     blr

xsnmsubadp is an FMA.  Multiply-subtract in this case, but that is just
a sign switch -- I often say FMA for all of fmadd, fnmadd, fnmsub, fmsub,
and their VSX counterparts.  "Anything that does a multiply-type operation
followed by an addition-type operation".  (And often call integer MADs
"FMA" as well, which is totally wrong, but :-) )

Reply via email to