[X86] Selectively mark the FMA variants inside a family as isCommutable.
authorQuentin Colombet <qcolombet@apple.com>
Wed, 7 May 2014 21:43:35 +0000 (21:43 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Wed, 7 May 2014 21:43:35 +0000 (21:43 +0000)
commit97e15a83098394ddb5a06af7e037bde851153c23
tree2a8180440ce54d87b7e6b58aa2b77684bc6c5872
parentdb411a94d2ec74c3912a28c40cd56ab70405fb49
[X86] Selectively mark the FMA variants inside a family as isCommutable.
Given a FMA family (e.g., 213, 231), not all the variants (i.e., register or
memory) are commutable.
E.g., for the 213 family (with the syntax src1, src2, src3):
fmaXXX213 A, B, reg3/mem3 == fmaXXX213 B, A, reg3/mem3

Now consider the 231 family:
fmaXXX231 A, B, reg3 == fmaXXX231 A, reg3, B
But
fmaXXX231 A, B, mem3 != fmaXXX231 A, mem3, B
Indeed, mem3 cannot be the second argument of the memory variant of fmaXXX231.

Working on a reduced test case!

<rdar://problem/16800495>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208252 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrFMA.td