https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106902
--- Comment #19 from Alexander Monakov <amonakov at gcc dot gnu.org> --- (In reply to rguent...@suse.de from comment #18) > True - but does that catch the cases people are interested and are > allowed by the FP contraction rules? I'm thinking of > > x = a*b + c*d + e + f; > > with -fassociative-math we can form two FMAs here? Yes; it might be reasonable to limit the match.pd rule to -fno-associative-math, leaving mul/adds as-is for tree-ssa-math-opts to recombine otherwise. > Of course with > strict IEEE compliance but allowed FP contraction we can only > do FMA (a, b, c*d) + e + f, right? I think so. > Does that mean -ffp-contract=on > only makes sense in absence of any other -ffast-math flags? Well, the proposal was to make -ffp-contract=fast an '-ffast-math' flag, not =on. I don't want to judge if '-ffp-contract=on -ffast-math' combination is reasonable or not, because -ffast-math by itself quite nonsensical already.