On 08/13/2012 12:33 PM, Uros Bizjak wrote: > AFAIU fma3 is better than fma4 for bdver2 (the only CPU that > implements both FMA sets). Current description of bdver2 doesn't even > enable fma4 in processor_alias_table due to this fact. > > The change you are referring to adds preference for fma3 insn set for > generic code (not FMA4 builtins!), even when fma4 is enabled. So, no > matter which combination and sequence of -mfmfa -mfma4 or -mxop user > passes to the compiler, only fma3 instructions will be generated.
This rationale needs to appear as a comment above > + (eq_attr "isa" "fma4") > + (symbol_ref "TARGET_FMA4 && !TARGET_FMA") Longer term we may well require some sort of (TARGET_FMA4 && !(TARGET_FMA && TARGET_PREFER_FMA3)) with an appropriate entry in ix86_tune_features to match. r~