This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: unfused fma question
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Steve Ellcey <sellcey at imgtec dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 23 Feb 2015 18:38:15 +0000
- Subject: Re: unfused fma question
- Authentication-results: sourceware.org; auth=none
- References: <02d0fee7-2c86-4291-8405-ae250d3210d9 at BAMAIL02 dot ba dot imgtec dot org>
On Fri, 20 Feb 2015, Steve Ellcey wrote:
> 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.
It's a bad idea for the meaning of GIMPLE codes to depend on command-line
options. Remember that objects built with different options may be linked
together with LTO. In view of offloading, it's a bad idea for the meaning
of GIMPLE codes to depend on the target either (though targets may still
have different machine modes, built-in functions, etc.).
Thus FMA_EXPR should only mean a fused operation (and I think the same
applies to fma RTL). Whether there should be a non-fused MULT_ADD_EXPR I
don't know.
(I wonder if convert_mult_to_fma is something that should move to
match-and-simplify infrastructure.)
--
Joseph S. Myers
joseph@codesourcery.com