R600/SI: Simplify and fix handling of VOP2 in SIInstrInfo::legalizeOperands
authorTom Stellard <thomas.stellard@amd.com>
Fri, 1 Aug 2014 00:32:35 +0000 (00:32 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 1 Aug 2014 00:32:35 +0000 (00:32 +0000)
commit5494792536ef1e46e08288fa0e9477a91da8c46a
treed647e17c893ed158e5229b4acb19f212abfadf93
parent635fb9fb5959c8550b3932451187b5f9e8c8ad80
R600/SI: Simplify and fix handling of VOP2 in SIInstrInfo::legalizeOperands

We were incorrectly assuming that all VOP2 instructions can read SGPRs
in Src0, but this is not true for instructions that read carry-in from
VCC.

The old logic has been replaced with new logic which checks the defined
register classes of the VOP2 instruction to determine whether or not to
legalize the operands.

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