R600/SI: Implement findCommutedOpIndices
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 26 Sep 2014 17:54:54 +0000 (17:54 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 26 Sep 2014 17:54:54 +0000 (17:54 +0000)
commit29202835d8a1664aa48eecb2cb1f02ce00fdaa32
tree091c83c07d1eb23f52c7a409cc6fe79b5d4b070f
parent8a70e28114f50b121c122a20a1cbafaa7b7e790d
R600/SI: Implement findCommutedOpIndices

The base implementation of commuteInstruction is used
in some cases, but it turns out this has been broken for a
long time since modifiers were inserted between the real operands.

The base implementation of commuteInstruction also fails on immediates,
which also needs to be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218530 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/SIInstrInfo.cpp
lib/Target/R600/SIInstrInfo.h