R600/SI: Allow commuting some 3 op instructions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 13 Nov 2014 19:26:47 +0000 (19:26 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 13 Nov 2014 19:26:47 +0000 (19:26 +0000)
commit1aae959de7fc8484b470562d99624879cf5f9396
tree3abd2d6a318bfd3b0d0876d45dac8cb7e18c1aab
parentab9c404bbdceead0ced57d5e805eeeb28941de35
R600/SI: Allow commuting some 3 op instructions

e.g. v_mad_f32 a, b, c -> v_mad_f32 b, a, c

This simplifies matching v_madmk_f32.

This looks somewhat surprising, but it appears to be
OK to do this. We can commute src0 and src1 in all
of these instructions, and that's all that appears
to matter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221910 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/SIInstructions.td
test/CodeGen/R600/commute_modifiers.ll
test/CodeGen/R600/fma.ll
test/CodeGen/R600/fmuladd.ll
test/CodeGen/R600/llvm.AMDGPU.umad24.ll
test/CodeGen/R600/use-sgpr-multiple-times.ll