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]

RE: unfused fma question


Steve Ellcey <Steve.Ellcey@imgtec.com> writes:
> 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 about to say that I see no reason to change how non-fused multiply
adds work i.e. leave them to pattern matching but I think your point was
that when both fused and non-fused patterns are available then what
should we do. 

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

I expect that fused multiply adds are almost always faster in hardware
owing to the lack of rounding so using them eagerly, when fp-contract
allows, may still be best even if non-fused alternatives are available.
That depends on the relative cost of the two alternatives though.

Matthew


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