unfused fma question
Richard Biener
richard.guenther@gmail.com
Tue Feb 24 14:11:00 GMT 2015
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.
>
More information about the Gcc
mailing list