This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

unfused fma question


I have a question about *unfused* fma instructions.  MIPS has processors
with both fused and unfused multiple and add instructions and for fused
madd's it is clear what to do; define 'fma' instructions in the md file
and let convert_mult_to_fma decide whether or not to use them.

But for non-fused multiply and adds, it is less clear.  One could
define '*madd' instructions with the plus and mult operator and
let the peephole optimizer convert normal expressions that have 
these operators into (unfused) instructions.  This is what MIPS
currently does.

Or one could change convert_mult_to_fma to add a check if fma is fused
vs. non-fused in addition to the check for the flag_fp_contract_mode in
order to decide whether to convert expressions into an fma and then
define fma instructions in the md file.

I was wondering if anyone had an opinion about the advantages or
disadvantages of these two approaches.

Steve Ellcey
sellcey@imgtec.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]