This is the mail archive of the
mailing list for the GCC project.
unfused fma question
- From: "Steve Ellcey " <sellcey at imgtec dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Fri, 20 Feb 2015 16:56:24 -0800
- Subject: unfused fma question
- Authentication-results: sourceware.org; auth=none
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
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.