[llvm-commits] [llvm] r163035 - in /llvm/trunk: lib/Target/X86/X86InstrFMA.td lib/Target/X86/X86InstrInfo.cpp test/CodeGen/X86/fma_patterns.ll

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Sep 4 14:27:41 PDT 2012


On Sep 4, 2012, at 12:20 PM, Craig Topper <craig.topper at gmail.com> wrote:

> The default implementation of findCommutedOpIndices returns the first two input operands which works for these instructions. We also have precedent in the commuting of SHRD and SHLD instructions which have a third immediate argument. They have partial custom code, but don't change from the default implementation of findCommutedOpIndices.
> 
> I made them commutable so that TwoAddressInstructionPass and optimizeLoadInstr can better optimize them.

I see. Thanks.

> We can still do better here because there are 3 different FMA3 opcodes that vary which operand is the destructive dest and where the load can be folded. Not sure the best way to work some of that into the infrastructure without creating a new pass. I'd appreciate any input you have on that.

I am not sure how that would work. Preferably, the destructive def should be tied to a use that is also a kill.

/jakob




More information about the llvm-commits mailing list