http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51340
--- Comment #4 from Oleg Endo <oleg.e...@t-online.de> 2011-12-29 00:02:40 UTC --- (In reply to comment #3) > (In reply to comment #2) > > Uhm, yes... > > The title should have been "Enable -mfused-madd by -ffast-math" > > Do you mean something like this? > > --- ORIG/trunk/gcc/config/sh/sh.c 2011-12-03 10:03:41.000000000 +0900 > +++ trunk/gcc/config/sh/sh.c 2011-12-27 08:33:23.000000000 +0900 > @@ -838,6 +838,11 @@ sh_option_override (void) > align_functions = min_align; > } > > + /* Default to use fmac insn when -ffast-math. See PR target/29100. */ > + if (global_options_set.x_TARGET_FMAC == 0 > + && fast_math_flags_set_p (&global_options) > + TARGET_FMAC = 1; > + > if (sh_fixed_range_str) > sh_fix_range (sh_fixed_range_str); > Yes, something like that. Or maybe check flag_unsafe_math_optimizations, as it is done for FSCA and FSRRA insns in sh.md. > > I don't know the exact semantics for the new patterns. All I know is that > > rounding is supposed to be done only once after the two operations. This is > > the case for the SH fmac insn. Not sure whether this is enough though. > > It seems that we can use the fma pattern, though it would be an another issue. Maybe when trunk is back to stage 1.