This is the mail archive of the gcc@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: unfused fma question


On Tue, Feb 24, 2015 at 2:56 PM, Andrew Haley <aph@redhat.com> wrote:
> On 02/24/2015 12:14 PM, Richard Biener wrote:
>> These concerns are correct.  Btw, as an answer to Steve - within
>> -funsafe-math-optimizations FMA_EXPR basically can be either
>> fused or not fused (but yes, bad as to Josephs concern).
>> So you could guard the pattern by flag_unsafe_math_optimizations.
>
> The unfused fma is always safe to use: it's the same as a multiply
> and an add, surely.

But it's not safe to use in place of a call to fma () - see fold_builtin_fma
which folds to FMA_EXPR if an optab is available (expecting that optab
to be a fused-multiply-add).

Richard.

> Andrew.
>


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