unfused fma question
Jeff Law
law@redhat.com
Sun Feb 22 19:00:00 GMT 2015
On 02/20/15 17:56, Steve Ellcey wrote:
> 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.t i
Are you referring to independent multiply and add operations being done
by a single instruction, similar to the old PA 1.1 fmpyfadd/fmpyfsub?
The problem with these kinds of instructions is there's no data
dependency, so no reason for combine to do anything useful for us.
I hacked something together for the PA eons ago, but was never happy
with it, both in terms of identifying opportunities and in terms of its
compile-time performance.
If I were to do it again, I'd model it in the scheduler first.
Basically you want to use the various hooks we have to encourage those
insns to fire together.
Then you'd have a peep2 to actually squash them into a single insn.
Jeff
More information about the Gcc
mailing list