On Tue, Feb 24, 2015 at 2:56 PM, Andrew Haley <a...@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. >