R600/SI Allow same SGPR to be used for multiple operands
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 26 Sep 2014 17:55:03 +0000 (17:55 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 26 Sep 2014 17:55:03 +0000 (17:55 +0000)
commitd991d2217b5b8fe01d797890f492c504ff581364
tree16617e5436b0a42302ab025add84c5f5dab2f26b
parentaed12d4bad3919415479a575efa03b1097681861
R600/SI Allow same SGPR to be used for multiple operands

Instead of moving the first SGPR that is different than the first,
legalize the operand that requires the fewest moves if one
SGPR is used for multiple operands.

This saves extra moves and is also required for some instructions
which require that the same operand be used for multiple operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218532 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/SIInstrInfo.cpp
test/CodeGen/R600/use-sgpr-multiple-times.ll [new file with mode: 0644]