[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 10:32:03 PDT 2012
On Aug 31, 2012, at 4:10 PM, Craig Topper <craig.topper at gmail.com> wrote:
> Author: ctopper
> Date: Fri Aug 31 18:10:34 2012
> New Revision: 163035
>
> URL: http://llvm.org/viewvc/llvm-project?rev=163035&view=rev
> Log:
> Mark FMA4 instructions as commutable and add them to the folding tables.
>
> multiclass fma4s<bits<8> opc, string OpcodeStr, RegisterClass RC,
> X86MemOperand x86memop, ValueType OpVT, SDNode OpNode,
> PatFrag mem_frag> {
> + let isCommutable = 1 in
> def rr : FMA4<opc, MRMSrcReg, (outs RC:$dst),
> (ins RC:$src1, RC:$src2, RC:$src3),
> !strconcat(OpcodeStr,
Hi Craig,
I am not sure it is safe to mark 3-input instructions as commutable. See TargetInstrInfoImpl::findCommutedOpIndices().
Why do you need to do that?
/jakob
More information about the llvm-commits
mailing list